Run whinepad 0.0.1 on the latest react
Hey Stoyan, could you tell me please, how can I run examples from the folder whinepad v0.0.1. It says http://prntscr.com/h3gt2z Uncaught TypeError: Cannot read property 'arrayOf' of undefined at Object.33.react (bundle.js:21004)
I guess it's in some way related to the new version of react but my knowledge is not enough yet to fix it by myself. Or maybe could you advise how can I use old version using npm for examples of your book. Thanks in advance!
Installing old version by
npm install [email protected] npm install [email protected]
seems working. Maybe would be useful for somebody
There are a few issues I've solved, seemingly. in Excel, use new react prop-types: import PropTypes from 'prop-types'; that's the 'arrayOf' error. I"ve upgraded to ES6 classes, fix some uses of 'this', use a constructor, bind the event handlers to this, fix setState(), and set propTypes as a static member. Excel.js.txt
also in button.js import PropTypes from 'prop-types'; rather than the destructuring assignment import React, {PropTypes} from 'react'; because the import is now (later version of React) moved into it's own separate component.
@qwadzie Thanks for the solution!
Tks @ekonoval this works for me. Just adding to it, maybe you may run the following commands in the repository again: npm install --save-dev babel-preset-react npm install --save-dev babel-preset-es2015