Skip to content

Initial version #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Oct 11, 2017
Merged

Initial version #6

merged 21 commits into from
Oct 11, 2017

Conversation

rreusser
Copy link
Contributor

@rreusser rreusser commented Oct 5, 2017

This component includes the changes discussed. The high points:

  • plotly.js is a peer dependency
  • the main export (import Plot from 'react-plotly.js') is a react component that will bundle plotly.js. It is documented here.
  • import factory from 'react-plotly.js/factory' is a function with which you can BYO plotly.js. The peer dependency will give you a warning but you may ignore it, as noted in the readme.
  • Finally, I've added a note on the roadmap so that people know what to expect in the near future.

(A small note that import { factory } from 'react-plotly.js' would not work. ES6 means static resolution of modules, and static resolution means there can be no option whether to import or not import plotly.js.)

TODO:

  • move nontrivial package.json scripts to js script tasks
  • check windows compatibility of build scripts
  • does anyone use bundled react components via script tags? I followed the recommendation because it's a thing you can do, but perhaps it should get the 🔪
  • publish

/cc @bpostlethwaite @nicolaskruchten @chriddyp @etpinard @monfera @alexcjohnson

@rreusser rreusser changed the title Initial release Initial version Oct 6, 2017
@rreusser
Copy link
Contributor Author

Going ahead an merging this. Leaving publish details as a separate issue.

@rreusser rreusser merged commit d4d4a97 into master Oct 11, 2017
@rreusser rreusser deleted the develop branch October 11, 2017 18:24
@rreusser rreusser restored the develop branch October 11, 2017 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant