Closed ericclemmons closed 9 years ago
This will be done by this week. An internal project (super complex) relies on it, and the only thing remaining is finish the client-side portion (since state changes require removing pre-loaded data).
Now onto a Redux demo...
:clap: looking nice, @ericclemmons!
What's insanely frustrating is how I just created a React v0.13 exmaple and context.router
is lost for anything using <Link />
(despite <RouteHandler />
correctly trying to render the handler).
$ npm install
$ npm run watch
Visit http://localhost:8080/index.html and click Submit.
Freakin' bizarre mayne.
Just confirmed that in Stargazers.js (when I return early with <p>Howdy!</p>
instead of the actual stargazers HTML):
// NO decorators
export default class Stargazers extends React.Component {
// no errors
@resolve("user", ({ params }) => params.user)
export default class Stargazers extends React.Component {
// no errors
@resolve("users", function({ user = "ericclemmons", repo = "react-resolver" }) {
const url = `https://api.github.com/repos/${user}/${repo}/stargazers`;
return axios.get(url).then(({ data }) => data);
})
export default class Stargazers extends React.Component {
// no errors
@resolve("user", ({ params }) => params.user)
@resolve("repo", ({ params }) => params.repo)
export default class Stargazers extends React.Component {
Warning: owner-based and parent-based contexts differ (values:
undefined
vs[object Object]
) for key (resolver) while mounting Resolver (see: http://fb.me/react-context-by-parent)
And with all 3 @resolve
s:
Warning: owner-based and parent-based contexts differ (values:
undefined
vs[object Object]
) for key (resolver) while mounting Resolver (see: http://fb.me/react-context-by-parent) Warning: owner-based and parent-based contexts differ (values:undefined
vs[object Object]
) for key (resolver) while mounting Resolver (see: http://fb.me/react-context-by-parent)
Already, it's clear that with React v0.13 that nested resolves lose some context despite still working for some reason.
MOTHER F'ING DUPLICATE REACTS!!!!!
React v0.13 example is complete!
https://github.com/ericclemmons/react-resolver/tree/v2/examples/react-v0.13
Because of bugs with the latest version of React & the upcoming changes to context, this rewrite aims to solve complex server-side rendering first, and then update for client-side usage.
Latest Status
v2
.Redux example.