-
Notifications
You must be signed in to change notification settings - Fork 64
Updates for React 0.13 #40
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
Updates for React 0.13 #40
Conversation
Refactored the API to match React 0.13. Resolves purescript-contrib#34
Looks good to me, thanks! |
Maybe I can reimplement my React Native bindings on top of this too, as well as Thermite. |
Great! I will update the readme and tutorial accordingly. On Monday, August 31, 2015, Phil Freeman notifications@github.com wrote:
|
I've updated the README. But I am wondering if this is still the best spot for a tutorial. Should we keep this? |
I only kept the tutorial because I was doing the minimum to update for 0.7, but I think you're right and it can be removed now. |
I've removed the tutorial. The only other thing I was thinking about was naming. Is it work transitioning to names like I am okay with names as they are, but wondered if it might be worth the switch. |
Yes we should break as many things as we can before the major version bump I guess. I think renaming to |
Agreed. I will make the updates to the names accordingly. On Tuesday, September 1, 2015, Phil Freeman notifications@github.com
|
Rename done. Let me know if there is anything you'd like me to incorporate into this PR. Thanks! |
💯 Thanks! |
Thank you! On Tuesday, September 1, 2015, Phil Freeman notifications@github.com
|
I've made some updates to make the API compatible with React 0.13.
The
render
functions are now a bit more bare-bones, but I'd be happy to add back some of the convenience functions likerenderToBody
, etc.Also, the
mkUI
now returns a foreign data type representing a React class. We could make the function return a React factory (which would give usprops -> UI
), but perhapsmkUIFactory
would be a better name for that behaviour.These changes are definitely up for discussion. It is a first-attempt at the API. Note that I still have to make updates to the README and the tutorial. I wanted to get thoughts on the API changes first.
PS - I've moved
react
to a dev-dependency. I am wondering if we can allow the end user to be responsible for ensuring react is present. There are some use-cases where bringing in react through bower is unnecessary (e.g., if webpack is being used).