Closed justinmc closed 8 years ago
Currently waiting on the React versions of nbmolviz2d and 3d to be published before merging:
https://github.com/Autodesk/nbmolviz2d/pull/12 https://github.com/Autodesk/nbmolviz3d/pull/8
This is achieved by wrapping nbmolviz2d/3d each in a light React component and Backbone view.
So for example, nbmolviz2d exports a React component that's ready to be used in any web app. We use it in this project (that sadly must use Backbone) by wrapping it in a React component (nbmolviz_2d_component.jsx) that just has the Backbone model as its state, so it rerenders whenever the model changes. Then a Backbone view required by ipywidgets wraps that (nbmolviz_2d_view.js).
The new React versions of nbmolviz2d/3d are live:
https://github.com/Autodesk/molecule-2d-for-react https://github.com/Autodesk/molecule-3d-for-react
And this appears to be working with them directly off of npm. Merging!
nbmolviz2d and 3d are being moved to React instead of Backbone for greater reusability. This PR will make this able to use the React version.
Waiting on https://github.com/Autodesk/notebook-molecular-visualization/pull/21.