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

Addition of Boundary() to setupServer() in react-native with help of AsyncLocalStorage alternative in RN #2188

Closed
1 task
pratyushbh opened this issue Jun 23, 2024 · 1 comment
Labels

Comments

@pratyushbh
Copy link

Scope

Adds a new behavior

Compatibility

  • This is a breaking change

Feature description

To add a Boundary() method to the setupServer() method in React native to isolate the behaviour of network just like in nodeJS ,since async_hook is not available in react-native, there's no AsyncLocalStorage() in react native like node.js, but there are some async local storage packages in react native that we can use or something else.

@kettanaito
Copy link
Member

Hi, @pratyushbh. Thanks for raising this.

I would love to add server.boundary() to React Native but it requires the AsyncLocalStorage API to work. There is no means to implement that API manually. It integrates into the event loop (and internal Node.js hooks) and cannot be provided from the userland.

We need to wait until React Native adds support for AsyncLocalStorage officially.

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

No branches or pull requests

2 participants