Brown D8React Integration is a Drupal 8 module for handling the insertion of compiled react applications.
Using Composer, Add the repository:
{
"type": "vcs",
"url": "git@bitbucket.org:webserv/brown-d8react-integration.git"
}
and require the module:
"require": {
"webserv/brown-d8react-integration": "dev-master"
}
Run composer install, and the module will be available to be enabled via the Drupal interface.
Below Content Components
in the dropdown, select Add React App
React Apps
dropdown, select the name of the app.Below Content Components
block..js
file/apps
directoryNote: The .js
filename will be used as the ID of the DIV that the app is rendered in, as well as the entry in the select menu with -
converted to spaces, and individual words capitalized.
Example: todo-app.js
needs to be looking for <div id='todo-app'></div>
as its base div, and will display in the menu as Todo App