Currently twind is using global state which requires rendering to be synchronous. twind has a create function for creating a twind context and I could share the tw function through a react context. Create a style provider for storing the required information. At the end replace the style tag in the same way I currently am, just with the request's twind instance instead of the global instance.
Currently twind is using global state which requires rendering to be synchronous. twind has a create function for creating a twind context and I could share the tw function through a react context. Create a style provider for storing the required information. At the end replace the style tag in the same way I currently am, just with the request's twind instance instead of the global instance.
https://reactjs.org/docs/context.html https://twind.dev/api/modules/twind.html#create