-
Notifications
You must be signed in to change notification settings - Fork 801
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
Don't wrap SFC with Stateful ProxyComponent #873
Comments
Ok. If some This will make most of functional components.. functional again! |
I have spiked possible solution, and everything should work IF that everything had Component in the beginning. In the same time - "just updated" always work, as long replace one function call by another - it's an easy task. |
There is an issue with implementation. Not all props got merged correctly. |
Fixed |
Currently, we wrap all the functional component into the stateful ones, and this is not very cool.
instance
to be used inhot-render
component.render()
Actually yes - hot-replacement-render still have a code for SCF, the only part it is missing -
context
. As long React 15 has context as a part of react-tree, React 16 has not.It is possible to render Components as we did it all the time, and tract the
context
between two Components asreact-tree-walker
is doing it (https://github.com/ctrlplusb/react-tree-walker/blob/master/src/index.js#L171) - just Object.assign({}, context, instance.getChildContext())The problem - sub-render. One could not start rendering in the "middle", as long there is no way to get
whole
context state in a random position.I hope some dirty hacks could provide us desired global context variable( ie
this._renderer._context
), but I don't know them yet.The text was updated successfully, but these errors were encountered: