New answers tagged

0

If you need to serialize the actions, you should probably represent them as data (i.e. plain JS objects, not necessarily strings) instead of functions. Since you have different kinds of actions with different "arguments", the discriminated union pattern will help. This essentially means every action has a kind property, and you switch on action....


Top 50 recent answers are included