BigRoomStudios / strangeluv

How I Learned to Stop Worrying and Love React
MIT License
35 stars 7 forks source link

upgraded eslint-config-standard-react and introduced @babel/preset-react #265

Closed bmleight closed 3 years ago

bmleight commented 3 years ago

Does some stuff:

Change all default React imports (i.e. import React from "react") to destructured named imports (ex. import { useState } from "react") which is the preferred style going into the future. This codemod will not affect the existing namespace imports (i.e. import * as React from "react") which is also a valid style. The default imports will keep working in React 17, but in the longer term we encourage moving away from them.

There are still the following dependencies to update:

Screen Shot 2021-02-12 at 4 25 30 PM

error-overlay-webpack-plugin upgrading to webpack 5 is still holding up upgrading the three webpack libraries.

Upgrading history to v5 comes with the following breaking changes:

It looks like the browser support could be the biggest concern, but according to caniuse and mozilla, the history api is widely supported (I am spoiled on my current project and only have to worry about chrome and am a bit out of date on browser support). It seems like we could try updating it in the next round.

Screen Shot 2021-02-12 at 4 58 07 PM Screen Shot 2021-02-12 at 4 55 36 PM
wswoodruff commented 3 years ago

Dude thanks for an awesome writeup on this!