A
A
Andrey Astafiev2019-12-26 15:06:02
JavaScript
Andrey Astafiev, 2019-12-26 15:06:02

How to add decorators in React?

We use flow on the project and assemble it with yarn, I read many ways on the Internet, nothing comes out all the time when yarn start gives an error

Support for the experimental syntax 'decorators-legacy' isn't currently enabled

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-12-26
@Robur

yarn you don't build anything - you just run the start script from package.json.
look there first and see what you really collect. Most likely this is some kind of babel or webpack with babel. Although for flow, maybe I haven’t used something yet, I don’t know.
and then google how to enable the decorators-legacy flag for that.
React has nothing to do with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question