Hi there,
I just wanted to update react-datepicker
and tried to do it like in https://github.com/cljsjs/packages/blob/master/react-datepicker/resources/cljsjs/react-datepicker/common/react-datepicker.ext.js
Thing is, that it does not find any DatePicker
namespace. I used dependencies like that:
<https://cdnjs.cloudflare.com/ajax/libs/react/16.3.0/umd/react.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.3.0/cjs/react-dom.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.0/moment.js>
<https://rawgit.com/Pomax/react-onclickoutside/v6.7.1/dist/react-onclickoutside.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/1.4.0/react-datepicker.js>
on https://tomjkidd.github.io/javascript-externs-generator/ like in the ext-file.
My suspicion is that
https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/0.53.0/react-datepicker.js
compared to
https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/1.4.0/react-datepicker.js
seems minified. I have not too much clue about all this js-stuff but it looks quite different and I cannot find exports["DatePicker"]
in the 1.4 version.
Anyone has an idea what the problem is? Thanks in advance!@timok Check browser console. React-dom url is wrong and react-datepicker can't be loaded without react-dom.
Though there is some error even with correct react-dom umd url
Okay, React-datepicker requires PropTypes also, this list works:
<https://cdnjs.cloudflare.com/ajax/libs/react/16.3.0/umd/react.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.3.0/umd/react-dom.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.1/prop-types.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.0/moment.js>
<https://rawgit.com/Pomax/react-onclickoutside/v6.7.1/dist/react-onclickoutside.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/1.4.0/react-datepicker.js>
Thanks! 👍
I will try to update it and will try to make a PR.