Fork me on GitHub
#reagent
<
2019-03-29
>
Hannu Hartikainen11:03:12

This code used to work, but after updating my dependencies I now need to use [:> HighchartsReact/default instead. Otherwise there’s an issue from React.createElementWithValidation because type is an object rather than a function (obviously).

Hannu Hartikainen11:03:16

This was difficult for me to debug and understand, because in js the usage still is import HighchartsReact from 'highcharts-react-official' and <HighchartsReact ...>.

Hannu Hartikainen11:03:01

The js code has changed from module.exports style to export default class HighchartsReact.

Hannu Hartikainen11:03:21

Should this be documented in Interop with React or is this a bug?

Hannu Hartikainen11:03:45

Whichever it is, I might make a pull request with a fix.

juhoteperi15:03:50

@hannu.hartikainen Is this with Shadow-cljs? If the package started using ES6, this doesn't seem like issue at all. To refer to the ES6 default export you should use ["highcharts-react-official" :default HighchartsReact] https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages

juhoteperi15:03:45

Or ["highcharts-react-official" :rename {default HighchartsReact}] which would be compatible with standard Cljs. Though I doubt Highcharts works with Cljs core npm module support.

Hannu Hartikainen16:03:17

Thanks @juhoteperi. I guess there's just too many moving parts to grok for me, but I might have been stuck with the same thing in js...