Skip to content

Topic/react 0.14 #56

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

Merged
merged 5 commits into from
Jan 25, 2016
Merged

Topic/react 0.14 #56

merged 5 commits into from
Jan 25, 2016

Conversation

ethul
Copy link
Contributor

@ethul ethul commented Nov 28, 2015

These changes update the API and reflect the split of react and react-dom that was introduced in version 0.14.

As a result, I have a separate purescript-react-dom repository set up for the react-dom bindings. Also, I moved out the example to purescript-react-example since it depends on purescript-react and purescript-react-dom. I'd be happy to move the new repos to purescript-contrib if we decide to go ahead with these changes.

One item I wanted to open up for discussion is how react.js is imported in the foreign code. I've added a require('react') line to import react, and I have added a package.json with react as a peerDependency for compatibility tracking. Going this route seemed appropriate given that we are using commonjs as a standard output for purescript. But making this change means tools like wepack and browserify need to be used for the JS assembly. Maybe this is an okay requirement. That being said, maybe we can make a failover during the require statement to add compatibility for react being available globally. I am open to ideas and suggests on this though.

Additionally, if we merge #54, I'd be happy to resolve the conflicts if we decide to go ahead with these changes.

@codedmart
Copy link

Just checking the status of this or upgrading to react 0.14 in general? Thanks!

@ethul
Copy link
Contributor Author

ethul commented Dec 9, 2015

@codedmart If the breaking changes of react 0.14 don't impact you then I believe you should be able to use react 0.14 with the purescript-react bindings at version 0.5.0. However, without the changes in this PR and purescript-react-dom there would not be bindings for stateless classes and bindings to react-dom.

@paf31 Do you think this PR looks okay to be merged? I am definitely open to suggestions and discussion on any of these changes.

@paf31
Copy link
Contributor

paf31 commented Dec 11, 2015

I'm playing catch-up on PRs this week after a vacation, but I'll get to this soon...

@ethul
Copy link
Contributor Author

ethul commented Dec 11, 2015

Thanks @paf31!

@nwolverson
Copy link
Contributor

Loving the change to use the npm react. Though I did struggle with the require path setup before reading the example.

@ethul
Copy link
Contributor Author

ethul commented Jan 23, 2016

@paf31 I know you mentioned you're catching up on PRs, but I wanted to ping you on #54 and #56. If you think they look okay, and if it helps, I'd be happy to do the merge and make a release (I'd just need repo access).

@paf31
Copy link
Contributor

paf31 commented Jan 23, 2016

@ethul Yes, very sorry about the delay. This email has been in my inbox for weeks now 😞

If you're willing, I was going to ask you if you'd like to be maintainer or co-maintainer on -react anyway, since I really don't use React very much any more.

@ethul
Copy link
Contributor Author

ethul commented Jan 23, 2016

No problem. I am happy to help maintain. I can merge these this weekend if
you think the PRs are okay.

On Saturday, 23 January 2016, Phil Freeman notifications@github.com wrote:

@ethul https://github.com/ethul Yes, very sorry about the delay. This
email has been in my inbox for weeks now [image: 😞]

If you're willing, I was going to ask you if you'd like to be maintainer
or co-maintainer on -react anyway, since I really don't use React very
much any more.


Reply to this email directly or view it on GitHub
#56 (comment)
.

@paf31
Copy link
Contributor

paf31 commented Jan 23, 2016

@ethul You should have full access to the repo now. The PR looks good to me, but I haven't spent any time with React 0.14 yet, so I'm not fully sure. If you say it's good to go, I'm sure it is. 👍

Do you think Thermite will need any big changes?

@nwolverson
Copy link
Contributor

I think it looks good, spent a little while using it and no issues.

@ethul
Copy link
Contributor Author

ethul commented Jan 24, 2016

@paf31 Thanks for the repo access. I will double-check on what changes might be necessary for Thermite.

@nwolverson Thanks for testing it out. Good to know.

@ethul ethul mentioned this pull request Jan 24, 2016
@ethul
Copy link
Contributor Author

ethul commented Jan 24, 2016

@paf31 Thermite compiles with no changes. I think the only breaking change is that purescript-react now requires react with a require statement. Instead of assuming it is available as a global. So Thermite users will have to ensure that this works for their setup.

@ethul
Copy link
Contributor Author

ethul commented Jan 24, 2016

@paf31 Also, the Thermite example may need an update since render is now in purescript-react-dom.

PS - Do you think moving purescript-react-dom to purescript-contrib makes sense?

@paf31
Copy link
Contributor

paf31 commented Jan 24, 2016

Ok, sounds good. Thanks very much for working on this.

When you're happy, could you please make a release? I was planning to work on Thermite today anyway, so I'll update it to be compatible.

@ethul
Copy link
Contributor Author

ethul commented Jan 24, 2016

Great. And very welcome.

I will make a release of everything, but I might not get it out until
tonight (EST).

On Sunday, 24 January 2016, Phil Freeman notifications@github.com wrote:

Ok, sounds good. Thanks very much for working on this.

When you're happy, could you please make a release? I was planning to work
on Thermite today anyway, so I'll update it to be compatible.


Reply to this email directly or view it on GitHub
#56 (comment)
.

ethul added a commit that referenced this pull request Jan 25, 2016
@ethul ethul merged commit 4826e10 into purescript-contrib:master Jan 25, 2016
@ethul ethul deleted the topic/react-0.14 branch January 25, 2016 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants