Fix Version/s: None
Sprint:SUIT Sprint 2019-02, SUIT Sprint 2019-03
Team:Science User Interface
Upgrade react and related components from 16.2 to 16.8
- don't upgrade redux
- upgrade any other react components.
- only do webpack and babel
- upgraded React.js to version 16.8
- converted AdvancedADQL to use react hooks which is a big feature of this release
The converted file make use of the new useState and useRef hooks, as well as demonstrate how updated props can be compared directly in the render function.
It serves as a test for the upgrade as well as demonstration of how new features are used.
Here is a complete changelog for react:
This blog highlight some of the changes in v16, up to v16.7.
Summary of the blog:
- Returning multiple elements from components with fragments (16.2)
- Returning strings and numbers from components
- Cancelling setState() to avoid rerendering
- Avoiding prop drilling with the official context API (16.3)
- Updating state based on props with getDerivedStateFromProps() (16.3)
- Re-rendering function components on props change with React.memo() (16.6)
- Easier access to context in class components with contextType (16.6)
- links to
Although ticket said to not upgrade to 16.8, Trey Roby privately suggested we should go ahead with the latest version. It's backward compatible. PR with test link seem to support that claim. No code change were needed for the upgrade. One file where modified to demonstrate usage of new features in this version.