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

Extra request to /api_url #782

Open
divergentdave opened this issue Jan 30, 2024 · 1 comment
Open

Extra request to /api_url #782

divergentdave opened this issue Jan 30, 2024 · 1 comment
Labels
Chore A task that produces no visible business value React App

Comments

@divergentdave
Copy link
Contributor

Two requests are made to https://app.host/api_url on page load. This is because ApiClient is constructed twice, once for the default value passed to createContext(), and once for the value of a useMemo() call, which is passed to a corresponding context provider.

@divergentdave divergentdave added React App Chore A task that produces no visible business value labels Jan 30, 2024
@jbr
Copy link
Contributor

jbr commented Jan 30, 2024

Ideally we'd template the api url into the client or html, but the way we're building the docker images doesn't allow for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore A task that produces no visible business value React App
Projects
None yet
Development

No branches or pull requests

2 participants