Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Co-authored-by: @jonathonherbert and @samanthagottlieb
This PR bumps react in
tagmanager
to16.14.0
, which will allow us to make use of React packages using hooks (introduced in16.8.0
) - for example the upcoming prosemirror-editor.Bumping to
17
+ will be more complicated - some of our dependencies are still using the deprecatedcomponentWillMount
,componentWillReceiveProps
andcomponentWillUpdate
methods - which are removed in React 17 - leaving only theirUNSAFE_...
equivalents.A few things that came up in the 15 > 16 React bump (may be relevant to atom-workshop and targeting if/when we do it there):
componentWill…
andcomponentDid…
lifecycle methods are now deprecated. To continue to use past React 16, useUNSAFE_component…
instead. They're not 'unsafe' in terms of security, but apparently encouraged bad development practices: https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html-
prop-types
comes from its own library now. Import from there instead of usingReact.PropTypes
moment
localiser has been moved to a separate package from version 3 > 4 (necessary to be compatible with React v16).react-transition-group
needed a bump - meaning thatimport CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
becameimport {CSSTransitionGroup} from 'react-transition-group';
I've fixed a couple of pre-existing missing
key
prop warnings as well.I did attempt bumping
react-router
but that one looks complicated as the API has changed -browser-history
will come from a separate package,Link
comes from a separate package (react-router-dom
),IndexRoute
no longer exists, and the app now needs to be wrapped in aRouter
orBrowserRouter
among other snags.How to test
Run
tagmanager
locally according to the instructions in the readme, or deploy to CODE. Does the app run as expected? Do you see any React-themed errors?(There will be some warnings about deprecated methods, but no errors)