jasonkuhrt / react-popover

A smart popover component for React
600 stars 253 forks source link

Updated PropTypes syntax #131

Closed mohitgupta8888 closed 6 years ago

mohitgupta8888 commented 7 years ago

Old syntax was giving error while building the code in production mode.

jasonkuhrt commented 6 years ago

@mohitgupta8888 Thanks for putting this PR together! Can you explain a bit further the problem you encountered and that this fixes? Thanks!

mohitgupta8888 commented 6 years ago

@jasonkuhrt Issue occurs with the minified bundled file. When I set the process.env.NODE_ENV variable to "production", and use babel-minify to minify the compiled file and it crashes in the browser. Screenshot Attached. popover-prop-types-issue

jasonkuhrt commented 6 years ago

Made a change that should cover this in https://github.com/littlebits/react-popover/commit/2cd758288b3d8ca017f2421db843eeee034cb292.