Warning: You are browsing the documentation for Symfony 5.0, which is no longer maintained.
Read the updated version of this page for Symfony 5.3 (the current stable version).
Do you prefer video tutorials? Check out the React.js screencast series.
Using React? First add some dependencies with Yarn:
$ yarn add @babel/preset-react --dev $ yarn add react react-dom prop-types
Enable react in your
1 2 3 4 5 6 7
// webpack.config.js // ... Encore // ... + .enableReactPreset() ;
Then restart Encore. When you do, it will give you a command you can run to install any missing dependencies. After running that command and restarting Encore, you’re done!
.jsx files will now be transformed through
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.