nkbt / react-height

Component-wrapper to determine and report children elements height
MIT License
180 stars 27 forks source link

Migrated deprecated React.PropTypes and React.createClass #26

Closed Andarist closed 7 years ago

Andarist commented 7 years ago

I think we should migrate to the es6 class syntax and stop using React.createClass, but that would be another step. For now just created this PR, so people stop having deprecation warnings after migration to React v15.5.

If you feel the same about class, I'll create an issue about it, so the matter won't get forgotten and neglected.

codecov[bot] commented 7 years ago

Codecov Report

Merging #26 into master will increase coverage by 5.76%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #26      +/-   ##
=======================================
+ Coverage   19.23%   25%   +5.76%     
=======================================
  Files           1     1              
  Lines          26    28       +2     
=======================================
+ Hits            5     7       +2     
  Misses         21    21
Impacted Files Coverage Δ
src/ReactHeight.js 25% <100%> (+5.76%) :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 cd4d15f...8a59c09. Read the comment docs.

Andarist commented 7 years ago

Ye, sure. We'll try to help with that and do both at the same time On Tue, 18 Apr 2017 at 10:09, Nik Butenko notifications@github.com wrote:

@nkbt commented on this pull request.

In src/example/App/VariableText.js https://github.com/nkbt/react-height/pull/26#discussion_r111893050:

@@ -1,4 +1,5 @@ import React from 'react'; +import createReactClass from 'create-react-class'; import {shouldComponentUpdate} from 'react/lib/ReactComponentWithPureRenderMixin';

Can only be used with ES6 Classes, not createReactClass factory =(

Need to update all the code to use Classes instead, to avoid extra dependency.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nkbt/react-height/pull/26#discussion_r111893050, or mute the thread https://github.com/notifications/unsubscribe-auth/AJWMknrxhPs38RQjvCeZ9gs_qECq1-cDks5rxG-kgaJpZM4M3rQ_ .

nkbt commented 7 years ago

Thanks! 💯