-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support for custom renderers #57
Comments
(We’re talking about React ≥ 0.14 of course) |
@yuchi That's a good thought. I had similar thoughts along these lines, but still having issues with the v2 branch with v0.14 & React Router v1 (and the issues is most likely that). TBH, I'm not 100% sure how well the Resolver will apply in those situations. Because React doesn't support async rendering, the current architecture has to recursively reveal the tree for dependencies to resolve. It's something that'd just have to be tested with those alternatives and see how well it works (or doesn't) and go from there, since the React Native render lifecycle is entirely different than vanilla React. |
React |
I guess I just don't actually know how they do it. Setting this for v3 in the meantime. |
I was working on the v2 branch today & got React v0.14 working.
I added some comments in 0a92e51, but I gotta figure out how this will work. For example, this really only makes sense on the server-side when using |
My initial idea to handle this will be to introduce something like: Resolver
.resolveWith(renderToString, () => <Handler {...state} />)
.then(({ markup, data }) => ...)
; Similarly, the client could use: Resolver.renderWith(render, () => <Handler {...state} />, node); The problem with the client-side version is that it _currently relies on The alternative to this is to render into a hidden "portal" via |
Because
Resolver.render
has an hard dependency onReact.render
it cannot be used with (for example)react-titanium
orreact-blessed
.An initial thought is to transform
to
so that I can use it with my renderer, such as
The text was updated successfully, but these errors were encountered: