-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unsafePerformEffect component #41
Comments
hmmm? |
...continued... I suggest that the documentation for No-one will believe that calling |
I wouldn't say it's the right thing to do. I prefer the "app bootstrap effect" pattern that's been used in examples (which I've unfortunately broken, but you can switch the git tag to the last major version to find them). Definitely need a lot of documentation work, I'll leave this open. But yeah, I recommend using |
For example: main = do
app <- mkApp
render (app unit)
mkApp = do
ctx <- createContext ...defaultCtxValue
child <- mkChild ctx
component "App" \_ -> React.do
...
pure $ provider ctx currentCtxValue [ ...more stuff ]
mkChild ctx = do
component "App" \_ -> React.do
xyz <- useContext ctx
pure ... |
I was recently trying to use I'm curious though, since I've only used the library for small examples, what approach you would recommend if you find yourself needing a context at many leaf nodes of a large app. Would you end up using |
We use Your |
Originally posted by @spicydonuts in #12 (comment)
The text was updated successfully, but these errors were encountered: