gaearon / react-deep-force-update

Force-updates React component tree recursively
MIT License
122 stars 19 forks source link

Does not work with fragment as root #18

Open EmielM opened 5 years ago

EmielM commented 5 years ago
var root = ReactDOM.render(<React.Fragment><A /><B /></React.Fragment>);
deepForceUpdate(root); // does not update component B

Eyeing the code, the early return on https://github.com/gaearon/react-deep-force-update/blob/master/src/index.js#L84 should probably move to after the sibling loop to make this case work.