28 ms·
This does worry me a bit though. There is probably a reason they are difficult to test, because they go against the React DOM pattern of a component only having
by danield9tqh 9y ago
This does worry me a bit though. There is probably a reason they are difficult to test, because they go against the React DOM pattern of a component only having control over the DOM nodes inside it. Call me a purist but this seems like a deviation from React's functional roots and going against the very problem React was trying to solve in the first place.
- maaaats 9y agoThat may be true, but not having this possibility has made react near unusable for a lot of common UI patterns on the web.
- danabramov 9y agoThe feature is mostly intended for rendering into nodes not managed by React. Such as a document child that is sibling to the application root.