javivelasco / react-css-themr

Easy theming and composition for CSS Modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backport switch to `prop-types` package to the v1 branch to add compat with react 16

mgcrea opened this issue · comments

After updating to react 16, I encountered the following error:

TypeError: Cannot read property 'shape' of undefined
./node_modules/react-css-themr/lib/utils/themr-shape.js
node_modules/react-css-themr/lib/utils/themr-shape.js:7

Would be great to add a 1.8 release with the switch to the prop-types package to maintain compatibility for people like us stuck on toolbox v1 for now.

Created a branch with this work. 1.7.2...bionikspoon:react_16

Tests are passing. I don't know your release process.

published a built version: https://github.com/bionikspoon/react-css-themr/tree/react_16_build

This fork is working it's way into production on my team. Conversation here: react-toolbox/react-toolbox#1703

{
  "dependencies": {
    "react-css-themr": "git://github.com/bionikspoon/react-css-themr.git#react_16_build"
  }
}

Hi,

this is already into the master and the issue can be closed in favor of #83 I guess :)

see at commit:
b7fec0d

@markusguenther I think this is not merged to master, in master I can still see older react version "react": "^15.5.4",

I meant the usage of proptype and so on ... see the file for instance in the master.

https://github.com/javivelasco/react-css-themr/blob/master/src/utils/themr-shape.js