Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Support React 0.14 #46

Closed
jakoblind opened this issue Oct 12, 2015 · 15 comments
Closed

Support React 0.14 #46

jakoblind opened this issue Oct 12, 2015 · 15 comments
Assignees
Milestone

Comments

@jakoblind
Copy link
Contributor

Hi,

After upgrading to React 0.14 I get the following error message:

ERROR in .//react-mini-router/lib/RouterMixin.js
Module not found: Error: Cannot resolve module 'react/lib/EventListener' in /path/to/project/node_modules/react-mini-router/lib
@ ./
/react-mini-router/lib/RouterMixin.js 2:20-54

@larrymyers
Copy link
Owner

I'm guessing this has to do with the separation of react and react-dom for 0.14.

I don't have a ton of time to devote to this issue immediately, so a pull request to get this library supported with 0.14 would be welcome.

@molson504x
Copy link

All you should have to do is require('react-dom')? Or am I mistaking something.....

@larrymyers larrymyers added this to the 1.2 milestone Oct 15, 2015
@larrymyers larrymyers self-assigned this Oct 15, 2015
@larrymyers
Copy link
Owner

I've tracked down where the functions from React that RouterMixin have moved to, though I'm still in the process of cleaning up all the tests and the example app. It's not a straight forward process since the team at Facebook have broken a few things from a compatibility standpoint.

@ykka
Copy link

ykka commented Oct 15, 2015

Yep, @larrymyers any estimation when you might finish making it compatible? Thanks!

@larrymyers
Copy link
Owner

No estimate right now. There are still errors in the example app, and I haven't done any cross browser testing yet. @ykka Any help would be welcome. Just check out the react-0.14-upgrade branch.

@ykka
Copy link

ykka commented Oct 16, 2015

I might do actually, I've just ditched the react-router... mini-router gives me much more flexibility I think.

I might look into it over the weekend if I find time.

@bragin
Copy link

bragin commented Oct 17, 2015

react-mini-router is just great compared to the monstrous react-router.

A very simple fix is to introduce a dependency to fbjs package, where they moved the EventListener.js module to, and fix corresponding require in the RouterMixin.js like this:
EventListener = require('fbjs/lib/EventListener'),

I am just testing the result, but it seems to work as expected. Please share your thoughts, maybe it's just pure magic.

UPDATE: I just found out that there is a react-0.14-upgrade branch where this stuff is going

@ykka
Copy link

ykka commented Oct 19, 2015

Hey, so @bragin (@larrymyers) to me it seems to work, any chances of merging it to master soon?

@ykka
Copy link

ykka commented Oct 19, 2015

Actually, I was wrong, it does seem to fail in my project. So I am not sure if it works or not.. I don't have enough time to look into it atm, sorry!

@larrymyers
Copy link
Owner

Todo for 0.14 Support:

  • Fix bugs in example app.
  • Run tests across Chrome, Safari, Firefox, IE 11, and IE 9
  • Verify compatibility with 0.12 and 0.13, or determine if this release will be 2.0.0
  • Update changelog and readme

@jakoblind
Copy link
Contributor Author

Any progress on this?

@larrymyers
Copy link
Owner

The day job has me almost completely occupied right now. I'd welcome any help by having pull requests target the react-0.14-upgrade branch.

@jakoblind
Copy link
Contributor Author

I have fixed the bugs in example app and made a pull request #49 . I have tested in Safari, Firefox and Chrome and it works fine!

react-mini-router is not compatible to react 0.12 or 0.13 because it has a dependency to react-dom. So I guess this would be a 2.0.0 release?

The update needed in the Readme would only be the requirement to React 0.14.

@larrymyers
Copy link
Owner

@jakoblind I agree, a major version bump to 2.0.0 seems like the right decision due to the new dependency on react-dom. Your pull request is merged, so I'll get things ready for release on master and get 2.0.0 pushed out to npm.

@larrymyers
Copy link
Owner

react-mini-router 2.0.0 is live on npm with support for React 0.14. Thanks to @jakoblind for doing all the heavy lifting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants