upgrades eslint-config-standard-react and introduces @babel/preset-react to play nice with React 17's new JSX transform
Removes now unneeded const React = require('react'); statements just used for JSX (see article linked in ☝️)
Destructure items being required from react, as per their recommendation in the article:
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:
Upgrading history to v5 comes with the following breaking changes:
Removed support for browsers that do not support the HTML5 history API (no pushState)
Removed relative pathname support in hash history and memory history
Removed getUserConfirmation, keyLength, and hashType APIs
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.
Does some stuff:
eslint-config-standard-react
and introduces@babel/preset-react
to play nice with React 17's new JSX transformconst React = require('react');
statements just used for JSX (see article linked in ☝️)There are still the following dependencies to update:
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.