-
-
Notifications
You must be signed in to change notification settings - Fork 137
cleaner callback API #63
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
Conversation
cleaner callback API readme tweak
449ff3b
to
8dbe621
Compare
<Plot | ||
data={this.state.data} | ||
layout={this.state.layout} | ||
frames={this.state.frames} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so here it'd be this.state.figure.frames, this.state.figure.layout, this.state.figure.layout..right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, this.setState(figure)
means that the state is the figure. You would be right if I'd done this.setState({figure})
(note the { }
).
README.md
Outdated
| Prop | Type | Default | Description | | ||
| ------------------ | ---------------------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `data` | `Array` | `[]` | list of trace objects (see https://plot.ly/javascript/reference/) | | ||
| `layout` | `Object` | `undefined` | layout object (see https://plot.ly/javascript/reference/) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
You can see an example of this method in action | ||
[here](https://codepen.io/rsreusser/pen/qPgwwJ?editors=1010). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
looks good to me! 💃 |
This PR is meant to partly address #49 and help users avoid issues like #61 or #59