Skip to content
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

React init aligns with runtime init #9

Merged
merged 1 commit into from
Aug 15, 2017
Merged

React init aligns with runtime init #9

merged 1 commit into from
Aug 15, 2017

Conversation

andrejewski
Copy link
Owner

@andrejewski andrejewski commented Aug 15, 2017

Building out raj-spa I ran into the problem of raj/runtime not accepting an init function. Or to put it another way, I ran into the problem of raj/react using an init function. Both make sense in their own ways but for the community at large the difference is a huge pain. My goal has always been to have the runtime and React runtime apps be aligned so that they can benefit, within reason, from the same ecosystem.

The solution was to lift the init(props) up one more layer. Which I think is the best move because in every app I have made with Raj I have only needed React (and thus props) at the root, once per app. So adding one more closure at the root is the best solution ergonomically. I also look forward to writing const init = [model, effect] as the function wrapper I always felt was verbose.

@andrejewski andrejewski merged commit 57aa624 into master Aug 15, 2017
@andrejewski andrejewski deleted the bare-init branch August 15, 2017 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant