frintjs / frintjs/frint

Maintenance: Upgrade to React v16

Open
#435 4 comments 0 reactions 0 assignees View on GitHub
help wanted proposal
Dominant language
JavaScript
Stars
756
Forks
33
PR merge metrics
No merged PRs in 30d

Description

## Currently

Our API of `frint-react` is based on the context API of React v15.

React v16 still supports the old (v15) context API in deprecated mode, but also makes room for additional improvements.

It has also introduced APIs like [`getDerivedStateFromProps`](https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops) , making way for better async rendering (while also deprecating [`componentWillReceiveProps`](https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops)).

## Proposal

We already have some additional proposals which make the API of FrintJS more simpler and stays close to the Component lifecycle where possible. Making it even easier to migrate to React v16:

* [ ] #424: Access to `app` instance synchronously
* [x] #428: Region component with render prop support
* [ ] #433: `MountApp` component
* [x] #436: Pass Region's props to Child Apps' root Components directly

While migrating to React v16, we can:

* Drop `observe` HoC
* Drop `data` prop in `Region` component
* Drop `RegionService`

Because parent props as a stream would be difficult to access, since [`componentWillReceiveProps`](https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops) is already deprecated and will be gone in React v17.

It will have to be a breaking change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.