Skip to content

NOT Integrating React Redux with Blocky

7coil edited this page Apr 26, 2019 · 1 revision

Do not try to mix Blockly with React components. As seen in the ezed branch of this repo, it causes React to spaz out as the virtual DOM is different to the real DOM that the web browser is displaying.

Instead, keep the Blockly div outside React, and create the workspace (referencing window.getElementById('blockly')) within the componentWillMount handler.

You can then pass around the workspace variable within React wherever you want it.

Clone this wiki locally