Izzimach / react-three-legacy

React bindings to create and control a 3D scene using three.js
Other
1.52k stars 127 forks source link

Handle strange Composite component/non-DOM node bug. #6

Closed Izzimach closed 9 years ago

Izzimach commented 9 years ago

There is an uncommon bug that happens when a React Composite Component (which is produced by React.createClass) is used with non-DOM nodes.

This problem occurs because in certain situation React tries to update the children nodes using DangerouslySetInnerHTML and obviously bombs since the nodes are not HTML.

The 'fix' is to provide a custom version of createClass for non-DOM nodes. There is already similar code in react-pixi