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

breaking: simplify api names #11

Merged
merged 2 commits into from
Oct 21, 2022
Merged

breaking: simplify api names #11

merged 2 commits into from
Oct 21, 2022

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Oct 20, 2022

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 20, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e095c98:

Sandbox Source
React Configuration
React Typescript Configuration

@dai-shi
Copy link
Member Author

dai-shi commented Oct 20, 2022

@EduardoLopes What do you think?

@EduardoLopes
Copy link

I missed that mention there!

I'm not a fan of big names either.

Right now:

jotai-apollo: atomWithQuery
jotai-relay: atomWithQuery
jotai-urql: atomsWithUrqlQuery
jotai-tanstack-query: atomsWithTanstackQuery

I don't see a case where all these are necessary in the same project, so i think it's ok to change all to atomWithQuery. In the edge cases where people will use more than one of these libs in the same project, they can rename it on import.

example:

import { atomWithQuery as atomWithApoloQuery } from "jotai-apollo";

Copy link
Contributor

@Aslemammad Aslemammad left a comment

Choose a reason for hiding this comment

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

LGTM!

@dai-shi
Copy link
Member Author

dai-shi commented Oct 20, 2022

@EduardoLopes
Thanks. Note that it will be atomsWithQuery, which has "s".
I'll be modifying jotai-urql soon. jotai-apollo and jotai-relay should follow this new naming too.

@dai-shi dai-shi merged commit c59a5e3 into main Oct 21, 2022
@dai-shi dai-shi deleted the rename-apis branch October 21, 2022 03:18
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.

3 participants