Skip to content

Conversation

nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Jan 29, 2025

Feedback needed here: I was trying out how the API would look like if we only export the Providers and functions we expect developers to use from hypergraph-react.

Benefit: small API surface with nice autocompletion
Downsides: we might not expose stuff people need for edge-cases we don't think about atm

@nikgraf nikgraf self-assigned this Jan 29, 2025
export {
HypergraphAppProvider,
useHypergraphApp,
useHypergraphAuth,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any better ideas for names than useHypergraphApp and useHypergraphAuth?

Copy link
Collaborator

@cmwhited cmwhited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was coming to the same realization working in the typesync app. I like the namespace style exports.. but it feels a bit clunky/not-normal here?? Anyway, I like the flattening.

@nikgraf
Copy link
Collaborator Author

nikgraf commented Jan 30, 2025

@cmwhited yeah, I think namespaces make sense when the API gets quite larger e.g. for the core library?

@nikgraf nikgraf merged commit d024ba6 into main Feb 4, 2025
4 checks passed
@nikgraf nikgraf deleted the ng/exports branch February 4, 2025 15:48
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.

2 participants