Skip to content

chore(site): replace setup machine by react-query #9809

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

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

No description provided.

@BrunoQuaresma BrunoQuaresma requested a review from a team September 21, 2023 13:23
@BrunoQuaresma BrunoQuaresma self-assigned this Sep 21, 2023
@BrunoQuaresma BrunoQuaresma requested review from Parkreiner and removed request for a team September 21, 2023 13:24
isLoading={createFirstUserMutation.isLoading}
error={createFirstUserMutation.error}
onSubmit={async (firstUser) => {
await createFirstUserMutation.mutateAsync(firstUser);
Copy link
Member

Choose a reason for hiding this comment

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

Forgot to ask earlier, but how has Coder generally approached error handling before? I checked the App.tsx file and didn't see a global error handler for the query client/cache, so I wasn't sure where/how we generally try to address errors

Copy link
Member

@Parkreiner Parkreiner Sep 21, 2023

Choose a reason for hiding this comment

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

Assuming error handling is taken care of, this looks good to me! Going to approve, just to avoid blocking you

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't have anything specifically but it depends if it is a form, a "display" page, or a standalone action.

  • Form forms, we get the error and pass down to the form component
  • For pages that show something we use an or a custom if you need it
  • For standalone actions like remove user, we use the displayError()

@BrunoQuaresma BrunoQuaresma merged commit 801c6c9 into main Sep 21, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/replace-setup-xservice-by-react-query branch September 21, 2023 14:21
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2023
@BrunoQuaresma
Copy link
Collaborator Author

Related to #9598

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

Successfully merging this pull request may close these issues.

2 participants