S
S
symnoob2020-10-10 22:38:04
symfony
symnoob, 2020-10-10 22:38:04

Symfony - how to properly set up webpack in symfony to work with React?

I tried to connect React in Symfony, and errors immediately fell down.
please help me set up webpackencore...

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-class-properties (https://git.io/vb4yQ) to the 'plugins' section to enable parsing.


Mistake:
class App extends React.Component {
     state = {
              ^
         data: [],
         pagination: {
             current: 1,

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question