Replies: 1 comment 11 replies
-
@goltra That's expected. If you want to avoid duplicate interceptors, you'll need to unregister it (I'm unclear how this works in Expo but you could probably extract it into a separate function) or refresh the whole page on change. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hello, I have an issue when implementing the interceptor.
I am working on an Expo project and using
client-fetch
. I'm using these versions:"@hey-api/client-fetch": "^0.2.4",
"@hey-api/openapi-ts": "^0.52.11",
In my main
_layout.tsx
file, I define the client configuration first:After that, I do a console log to check that the interceptor has been correctly created:
The problem occurs when I modify the
_layout.tsx
file. Each time I modify and save it, a new interceptor is added to the client, and this keeps happening every time I modify and save the file.As you can see in the code, I add a function so that it is referenced within the interceptors, but it still keeps adding it.
Here you have a video about this issue
Grabacion.de.pantalla.2024-09-03.a.las.13.32.43.mov
Does anyone have any idea what the problem might be?
Reproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
No response
Beta Was this translation helpful? Give feedback.
All reactions