Prepare for async rendering
ThePaulMcBride opened this issue · 1 comments
To prepare for async rendering coming in a not too distant version of React, the following lines of the use of the lifecycle method componetWillReceiveProps
should be removed.
Here is where it is currently being used.
https://github.com/tkh44/holen/blob/master/src/index.js#L25-L31
According to this great article by the React team the best option is to use the new lifecycle method getDerivedStateFromProps
.
The React team have released a polyfill for this method which would maintain backwards compatibility.
Let me know if you'd like help implementing this.
If you would like to do this I would be grateful. I have started to use https://github.com/jamesplease/react-request more than this library. I should probably put up a link on the readme.