react-ionize
react-ionize copied to clipboard
Add <ipc> element
This is something I've been wanting to do since I started. This element will be where you attach IPC handlers for messages coming to/from browser windows. I imagine the syntax should look something like this:
<ipc channel="my-channel" onMessage={/* handler function */} />
It might be a good idea to set things up so that nesting an <ipc> inside a <window> would only handle messages from THAT window. Or not, it's just an idea.
Another idea: explicitly create a "sync" prop which indicates that the return value of the onMessage function will be synchronously returned to the client.