ReactDOM
Displaying 1 - 1 of 1React in Drupal - starter
This is a starter-kit or tips to ignite the use of react under Drupal
Code Snippet
import React from 'react';
import ReactDOM from 'react-dom';
let helloElement = React.createElement(
"h1",
{ id: "greeting", className: "hello" },
"Hello, World!"
);
let rootElement = document.getElementById("react-root");
ReactDOM.createRoot(rootElement).render(helloElement);