Replies: 1 comment 1 reply
-
Check out https://github.com/jlalmes/trpc-chrome |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Idea: Messaging Between Contexts Easily (background, content, popup, sidepanel)
I’m considering creating a utility to facilitate messaging between different contexts such as background, content, popup, and sidepanel, similar to what TanStack's
createServerFn
does.The core idea is to create a pattern for handling messages in a structured way. For example:
The
greet
message would provide two functions:browser.runtime.onMessage.addListener
).browser.runtime.sendMessage
).Additionally, all types would be automatically generated to ensure type safety and prevent errors.
I’m still refining the concept, but it seems like a great fit for WXT. Would love to hear thoughts on this idea!
Link to tanstack start server function https://tanstack.com/start/latest/docs/framework/react/server-functions
Beta Was this translation helpful? Give feedback.
All reactions