3 ms·
>one can't dictate the markup exactly the way one wants because it has to be recognizable to the virtual dom as well I'm not sure what you mean. On the opposit
by danabramov 12y ago
>one can't dictate the markup exactly the way one wants because it has to be recognizable to the virtual dom as well
I'm not sure what you mean. On the opposite, with React, you specify exactly the DOM (or UIView) tree you want to get.
You will build different components for React web and React Native, there's no common ground between them. The platforms are too different.
- jordanlev 12y agoI can't seem to find it now, but I remember seeing something a few months back about support for some HTML tag being added to react. I could be wrong about that, though (which would be great). I guess my question is this: can React/JSX render any kind of well-formed arbitrary markup? Like if next week there is a <doohickey> html tag I want to use, will it work? Or would react have to be updated to "support it" somehow?
- danabramov 12y ago>I remember seeing something a few months back about support for some HTML tag being added to react. It's just due to React <=0.12 using an HTML tag whitelist to tell native tags from custom components. It's not an issue anymore in 0.13, where any HTML tag (including custom Web Components) will work: https://github.com/facebook/react/pull/2830 https://github.com/facebook/react/pull/2830 There's still an attribute whitelist, and that's a trickier problem to solve: https://github.com/facebook/react/issues/140 https://github.com/facebook/react/issues/140
- jordanlev 12y agoAh, that makes sense. Thanks!