0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

Update app to support react hooks #339

Closed mariano-aguero closed 5 years ago

mariano-aguero commented 5 years ago

Closes #330

fvictorio commented 5 years ago

Updated CRA to 3.0.0. This speeds up recompilation times significantly. The downside is that it adds some typescript linting (see here).

The problem with this is that those warnings/errors are shown in the yarn start terminal, and you could miss them. Errors are not a problem, because the app won't start, but warnings may slip by. I added a .eslintrc.json file so that those warnings and errors can be shown in your editor, but you might need to make some configuration changes. It wasn't a big problem for me in vim, so I guess it should be easy too in big fancy IDEs.

To test if warnings show up, go to footer.tsx and remove the rel="noopener noreferrer" attribute. That should show a warning.

Agupane commented 5 years ago

Hi @mariano-aguero, there are some failing tests, I think there is a problem with Jest dependencies

fvictorio commented 5 years ago

there are some failing tests, I think there is a problem with Jest dependencies

That's a problem with my changes. I'll take a look. I think it may be a cache issue with Circle, but I'm not 100% sure.

fvictorio commented 5 years ago

Changed how the cache is used in Circle, based on their page about yarn. The --frozen-lockfile is recommended in the yarn install docs:

If you need reproducible dependencies, which is usually the case with the continuous integration systems, you should pass --frozen-lockfile flag.