![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@comapeo/ipc
Advanced tools
IPC wrappers for CoMapeo Core. Meant to be used in contexts where there is a communication boundary between the contexts your code runs in e.g. Electron, React Native (with NodeJS Mobile), and NodeJS worker threads. The channel messaging API is an example where this usage applies.
Note that @comapeo/core
is a peer dependency, so you may have to install it manually depending on your package manager.
npm install @comapeo/ipc @comapeo/core
createMapeoServer(manager: MapeoManager, messagePort: MessagePortLike): { close: () => void }
Creates the IPC server instance. manager
is a @comapeo/core
MapeoManager
instance and messagePort
is an interface that resembles a MessagePort
.
Returns an object with a close()
method, which removes relevant event listeners from the messagePort
. Does not close or destroy the messagePort
.
createMapeoClient(messagePort: MessagePortLike, opts?: { timeout?: number }): ClientApi<MapeoManager>
Creates the IPC client instance. messagePort
is an interface that resembles a MessagePort
. opts.timeout
is an optional timeout used for sending and receiving messages over the channel.
Returns a client instance that reflects the interface of the manager
provided to createMapeoServer
. Refer to the rpc-reflector
docs for additional information about how to use this.
closeMapeoClient(mapeoClient: ClientApi<MapeoManager>): void
Closes the IPC client instance. Does not close or destroy the messagePort
provided to createMapeoClient
.
In the server:
import { MapeoManager } from '@comapeo/core'
import { createMapeoServer } from '@comapeo/ipc'
// Create Mapeo manager instance
const manager = new MapeoManager({...})
// Create the server instance
// `messagePort` can vary based on context (e.g. a port from a MessageChannel, a NodeJS Mobile bridge channel, etc.)
const server = createMapeoServer(manager, messagePort)
// Maybe at some point later on...
// Close the server
server.close()
In the client:
import { createMapeoClient, closeMapeoClient } from '@comapeo/ipc'
// Create the client instance
// `messagePort` can vary based on context (e.g. a port from a MessageChannel, a NodeJS Mobile bridge channel, etc.)
const client = createMapeoClient(messagePort)
// Use the MapeoManager instance from the server via the client!
const projectId = await client.createProject({...})
const project = await client.getProject(projectId)
const projects = await client.listProjects()
client.on('invite-received', (invite) => {
// ...
})
// Maybe at some point later on...
// Close the client
closeMapeoClient(client)
FAQs
IPC wrappers for CoMapeo Core
The npm package @comapeo/ipc receives a total of 74 weekly downloads. As such, @comapeo/ipc popularity was classified as not popular.
We found that @comapeo/ipc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.