Part of the Webpack ecosystem · 4 projects
This module provides React integration with the webpack module bundler. It allows you to use React components within your Drupal site by configuring webpack to process your React code.
Provides React configuration for the webpack module.
Dependencies
Installation
yarn add react react-dom @babel/preset-react
Example usage
module.libraries.yml
test:
webpack: true
js:
index.js: {}
index.js
import React from "react";
import ReactDOM from "react-dom";
class Greeting extends React.Component {
render() {
return (
<div>
{this.props.text}
</div>
);
}
}
ReactDOM.render(<Greeting text="Hi!" />, document.getElementById('page'));
Ask your assistant about Webpack React
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Webpack ecosystem
Most installed first