purescript-thermite icon indicating copy to clipboard operation
purescript-thermite copied to clipboard

`createReactSpec` type too restrictive.

Open martyall opened this issue 7 years ago • 4 comments

In my experience, having to supply the initial state without access to any effects while calling createReactSpec is a bit to restrictive. Given that the ReactSpec has a getInitialState field which allows effects, should't we allow the same opportunity here?

martyall avatar Nov 14 '17 20:11 martyall

Sounds useful. Would you like to make a PR and we can compare?

Thanks!

paf31 avatar Nov 14 '17 20:11 paf31

sure, should be easy

martyall avatar Nov 14 '17 20:11 martyall

Here's a pr with breaking changes, but maybe we can start here

https://github.com/paf31/purescript-thermite/compare/master...blinky3713:effectful-initial-state

martyall avatar Nov 14 '17 20:11 martyall

Thanks! This would be a breaking change, but maybe it's better this way. Could you please open a PR?

paf31 avatar Nov 14 '17 21:11 paf31