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

[visx/visx] namespace all exports #1047

Closed
williaster opened this issue Feb 4, 2021 · 4 comments
Closed

[visx/visx] namespace all exports #1047

williaster opened this issue Feb 4, 2021 · 4 comments

Comments

@williaster
Copy link
Collaborator

#1043 name-spaced the @visx/xychart package from @visx/visx to an XYChart variable to avoid name conflicts between package exports.

For 2.0.0 we could make this consistent for all packages.

@robsutcliffe
Copy link
Contributor

@williaster I'd be willing to help as a beginner

To clarify: the plan is for all packages exported here to be exported using the package name as a namespace. so for example Annotation would be imported like:
import { Annotation } from '@visx/visx';

and then used like:
<Annotation.LineSubject />

@williaster
Copy link
Collaborator Author

hey @robsutcliffe 👋 , awesome!

yes, you're correct about the plan and the API 💯 We did this initially with the @visx/xychart package, and as you can see in the index file you linked to we used XYChartPackage for the exported name. I think ideally we don't include *Package in the export name, your example of Annotation is could be used across all packages (e.g., XYChartPackage could be updated to XYChart).

@robsutcliffe
Copy link
Contributor

Great. Feel free to assign this to me and I'll add a PR soon

@williaster
Copy link
Collaborator Author

closed by #1121

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