Reinstalling Flow and Prettier

Let's start with Flow. It's quite simple to do this: I just did the same as for Node, adding the same packages, scripts, .flowconfig file, and so on. (If you need to, check out the Adding Flow for Data Types checks section of Chapter 1, Working with JavaScript Development Tools for more information.)

Next, let's deal with Prettier. It also is a simple matter: I had to remove the following lines from package.json and put them in a separate .prettierrc file:

{
"tabWidth": 4,
"printWidth": 75
}

Flow already knows about React and CRA, so you won't need anything with regard to that. However, to use PropTypes (we'll get to that very soon), you'll need the appropriate flow-typed package, which is easy to install:

npm run addTypes prop-types@15
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.182.66