purescript-halogen-store icon indicating copy to clipboard operation
purescript-halogen-store copied to clipboard

Update README.md

Open flip111 opened this issue 3 years ago • 3 comments

I found bits of the readme confusing.

The terminology "connected component" is unnecessary in my opinion. And is also confusing because according to the current readme a connected component just needs MonadStore and whether the connect function is used is irrelevant.

I talk a bit more about the library internals, because it seemed magic to me just reading the readme. Had to dive into the code to understand.

Not sure what the purpose is of this thing https://github.com/thomashoneyman/purescript-halogen-store/blob/main/src/Halogen/Store/Connect.purs#L56 doesn't seem to be set or modified anywhere else.

Probably my edits introduced some more mistakes, can edit some more after review.

flip111 avatar Jan 06 '22 00:01 flip111

Have to reconsider this:

If you have a receiver set up to modify your state when you get new input, then the component will re-render on new input But if you don’t then it won’t

flip111 avatar Jan 06 '22 17:01 flip111

In this case, the connect component already does have a receiver set up to send input through to your child component. And your connected component needs to receive input, or else it won't know when the store has updated. But you're correct, if you don't have a receiver then your component won't re-render on input.

thomashoneyman avatar Jan 06 '22 19:01 thomashoneyman

What about the original input ? is it correct what i wrote about it ?

flip111 avatar Jan 06 '22 19:01 flip111