reassemble icon indicating copy to clipboard operation
reassemble copied to clipboard

needs better docs, examples

Open DanielFGray opened this issue 8 years ago • 1 comments

For instance, how do you actually use the lifecycle composables?

DanielFGray avatar Aug 03 '17 01:08 DanielFGray

And a basic react-redux example. As I see it, the connect can not life within the assemble HOC?

Cross post from #4:


This doesn't work for example:

assemble(
  connect(), // react-redux/connect
  withHandlers({
    requestSubmit: ({ form, dispatch }) => () => {
      dispatch(submit(form)); // ERR: dispatch is `undefined`
    },
  }),
),

The ~~correct~~ working way would be:

compose(     // recompose/compose
  connect(), // react-redux/connect
  assemble(  // reassemble/assemble
    withHandlers({
      requestSubmit: ({ form, dispatch }) => () => {
        dispatch(submit(form));
      },
    }),
  ),
);

smeijer avatar Sep 20 '17 11:09 smeijer