Skip to content
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

Create React Interop Examples #77

Open
curran opened this issue Mar 21, 2017 · 2 comments
Open

Create React Interop Examples #77

curran opened this issue Mar 21, 2017 · 2 comments

Comments

@curran
Copy link
Owner

curran commented Mar 21, 2017

(Excerpted from a discussion on the D3 Slack)

The thought "d3-component as a replacement for React's Component, as it basically replicates its functionality" is correct. But I also recognize that they need to play well together. It is possible to create a general-purpose shim between them, to create a React component "wrapper" or "wrapper factory" around any component authored using d3-component. I've been meaning to make this, or at least a PoC for it, but have not yet. It would translate into simply passing the props from the React component render function into the d3-component instance. I'd welcome a PoC for this.

@curran curran changed the title Create React Wrapper Create Generic React Wrapper Mar 21, 2017
@curran
Copy link
Owner Author

curran commented Mar 25, 2017

The first step would be to create a working example where a React component wraps around a specific d3-component. Maybe the Airport Clocks would be a good example?

Would be cool to have a "React Analog Clock" component up on NPM!

@curran curran changed the title Create Generic React Wrapper Create React Interop Examples Mar 27, 2017
@warrenronsiek
Copy link

warrenronsiek commented Apr 11, 2017

You might want to look at this: https://github.com/skellyb/react-d3-wrap. It seems like he has already implemented a D3 component wrapper - might be able adapt it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants