UI Deploy

Curated, Short, Web UI Dev we Love.

Including a React.js entrypoint from a Drupal menu callback

A quick hint for handling your entry point to a react app from within a Drupal module, particularly when using the react-hot-loader during development. 

Set up a drupal variable, initializing it in your settings.php.  You can then change this for your local environment so that a code change isn't required for every code push. Then include the appropriate react entry point based on this variable.

view source

Advertisement