You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would allow some possible speedup. A gotcha is when the ref is set to a string or a potential string. Then they need to go through createElement. Though this method is discouraged nowadays and callbacks should be used instead.
Also see React issue #3228
The text was updated successfully, but these errors were encountered:
@rauhs I thought about this as well. I think it's also possible in React versions before 0.14, provided the object literals have a key called $$typeof with the symbol Symbol.for("react.element"). Just haven't had a chance to look into this more deeply. Patch welcome! :)
This prompted me to basically rewrite/fork sablono that removes the interpreter and is way less powerful.
I don't actually want to publish a fork of sablono so my question now is basically: Would you be interested in a "sablono.light" namespace living in this repository for users that want this functionality? It still uses much of your code.
@rauhs I'm not sure about this "light" namespace. I think supporting a 3rd way to build React nodes is a bit too much. However, I'm still interested in the object literal approach.
Starting with React 0.14, we can feed React object literals instead of calls to
React.createElement
:This would allow some possible speedup. A gotcha is when the ref is set to a string or a potential string. Then they need to go through
createElement
. Though this method is discouraged nowadays and callbacks should be used instead.Also see React issue #3228
The text was updated successfully, but these errors were encountered: