Closed ericclemmons closed 8 years ago
This API needs to happen sooner than later.
Hey, I've upgraded Transmit to support React 0.14. It was really really easy (supporting React Router 1.0 was actually more complex). You just have to remember to require react-dom/server
for server-side rendering. Speaking of which, why don't you use renderToString
instead of renderToStaticMarkup
?
That's good to hear!
I know it works with React v0.14, but I was going to change the API so that you supply the renderer you want to use (native, v0.13, v0.14, that terminal one, whatever).
https://github.com/ericclemmons/react-resolver/blob/master/examples/react-v0.14/src/app.js#L39
What part are you referring to with renderToStaticMarkup
?
I was referring to: https://github.com/ericclemmons/react-resolver/blob/1cf78025f1d3a17f23ce1ad86f0b657a508c122c/src/Resolver.js#L50
But I see what you did there. Resolver's first render uses renderToStaticMarkup
for better performance, right?
Right, that's the gist. I dunno which is more performant (I assumed having no react-id
would be better, but maybe there's a cleanup on the markup afterwards?).
But yes, the gist is that a static render is done recursively until the tree completes rendering.
Clever! :) I think I'll have to "bring that over"...
Sure, steal away! I'm always disappointed that async rendering somehow doesn't "click" with people O_o
Apart from the annoying React.render
deprecation warning, are there any side effects using v2 with React v0.14?
No, it actually works much more reliably thanks to how context was fixed in React v0.14! In fact, I'm making API changes today (Mac willing!) for official support, now that 0.14 has been out for a while and I have it in production.
On Sun, Dec 13, 2015 at 5:33 AM ratson notifications@github.com wrote:
Apart from the annoying React.render deprecation warning, are there any side effects using v2 with React v0.14?
— Reply to this email directly or view it on GitHub https://github.com/ericclemmons/react-resolver/issues/81#issuecomment-164248782 .
- Eric Clemmons
Been on an open-source spree lately. I was going to change the API to do something like React.renderWith(ReactDOM.render)
, but I'd rather just have a peerDependency
on react-dom
.
v3.0.0 was just released with peer dependencies on react and react-dom v0.14. @ratson, you shouldn't see any more of the deprecation warnings.
@ericclemmons huge thanks for letting me hop in and help get this out. hopefully the upgrade is smooth for everyone (just pushed v3 to prod here at work and everything's looking great). I'll be keeping an ear out for problems, so please comment with any issues you run into.
@pwmckenna :clap:
Thanks so much for the help!
It's coming!
Plus, this will improve the API for rendering. Luckily, the code already has
@TODO
messages for where the replacements need to happen.