ericclemmons / react-resolver

Async rendering & data-fetching for universal React applications.
https://ericclemmons.github.io/react-resolver
Other
1.65k stars 52 forks source link

Regression with HistoryLocation in React v0.13 Example #78

Closed ericclemmons closed 9 years ago

ericclemmons commented 9 years ago

First discovered in ericclemmons/react-resolver#77:

example

ericclemmons commented 9 years ago

To be honest, I can't figure out how this is an issue with the Resolver & can only confirm it's an issue with React Router v0.13.3:

router

It's not a problem with React Router v1.0.0-beta3:

14

I just opened rackt/react-router#1833 for help on this & will re-open this issue as needed...

benbonnet commented 9 years ago

but React Router v1.0.0-beta3 kinds of requires react 0.14 (or later), doesnt'it ?

ericclemmons commented 9 years ago

@bbnnt I didn't think so:

https://github.com/rackt/react-router/blob/master/package.json#L52

I'd <3 to figure out a fix for this, but when the callback from Router.run isn't firing, I'm all out of options.

ericclemmons commented 9 years ago

Ok, somehow my comment wasn't saved. Anyway, fixing it now:

history

You can see how the usage of Resolver.render (where it tries to load the data behind the scenes before rendering) causes issues with React Router.

benbonnet commented 9 years ago

Does the react-router guys just removed the callback without any specific reason and no retro-compatibility ? Feels weird, bcause with some specific versions of the concerned packages, things did work

ericclemmons commented 9 years ago

I think it has something to do with context getting confused or whatever. Personally, I really just don't know.

Either way, the ability to "pre-load" before rendering will come back. I don't think anyone outside of myself was actually utilizing that.