ctrlplusb / react-async-component

Resolve components asynchronously, with support for code splitting and advanced server side rendering use cases.
MIT License
1.45k stars 62 forks source link

use constructor instead of componentWillMount #91

Closed mgreer closed 4 years ago

mgreer commented 6 years ago

This moves setup into the constructor, to avoid error when using <React.Strict> wrapper to check for futureproofing. React 17 won't allow componentWillMount.

Also removed console.log calls, since libs shouldn't be so chatty in production IMHO.

codecov[bot] commented 6 years ago

Codecov Report

Merging #91 into master will increase coverage by 0.09%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
+ Coverage   92.59%   92.68%   +0.09%     
==========================================
  Files           3        3              
  Lines          81       82       +1     
  Branches       24       24              
==========================================
+ Hits           75       76       +1     
  Misses          6        6
Impacted Files Coverage Δ
src/asyncComponent.js 90.62% <100%> (+0.14%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 09935a2...897281e. Read the comment docs.

jul-sh commented 6 years ago

Looks great. @ctrlplusb any update on this? Seems like it would be a cool change.