You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.
Second, I followed the example and struggled for a few minutes to get this to work in ES6 before I realising that I needed to do import * as d3 from 'd3' instead of `import d3 from 'd3', as per this thread.
@Olical, do you have any plans to update the docs to include some ES6 usage example, or should I do a simple PR with an ES6 example?
The text was updated successfully, but these errors were encountered:
Ah, that's a sneaky one that caught me out too. Not the first time I've been angry at the JavaScript module system (or JavaScript in general). It'd definitely be worth documenting it, even though D3 isn't a hard requirement for this project it's something that will catch people out again and again.
Maybe add a section to the readme just after installation that shows ES5 and ES6 import styles with the D3 caveat. Maybe even a script tag for the CDN version too. One quirk about the CDN file (which I don't use, some people requested it, I think you should depend on it and build it into your main script) is the name it's exported with. It's accessed by window['react-faux-dom'] not window.ReactFauxDOM as you'd expect.
Could be worth mentioning that too. I can do it but if you had some time and wanted to write up a little readme section I'd be happy to merge it 😄
First, thanks for great work!
Second, I followed the example and struggled for a few minutes to get this to work in ES6 before I realising that I needed to do
import * as d3 from 'd3'
instead of `import d3 from 'd3', as per this thread.@Olical, do you have any plans to update the docs to include some ES6 usage example, or should I do a simple PR with an ES6 example?
The text was updated successfully, but these errors were encountered: