Skip to content

Helper functions

Choose a tag to compare

@franciscop franciscop released this 14 Jul 16:46
· 226 commits to master since this release

Added many array helpers:

export default () => {
  const { push, concatenate, ...actions } = useActions('books');
  return <div onClick={() => push('abc')}>Add ABC</div>;
};

Added assign for objects:

export default () => {
  const { assign }  = useActions('user');
   return <div onClick={() => assign({ name: 'John' })}>Set John</div>;
};

Added and cleaned up tests for those helpers.