![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.
@archetypical/conduit
Advanced tools
Conduit client is a javascript client designed to easily integrate with a Conduit server implementation. The Conduit client is intended to be used with a server Conduit implemented in .net core. Please see the full documentation here.
Install globally via npm:
npm install -g @archetypical/conduit
Or globally via yarn:
yarn global add @archetypical/conduit
Once you have established your server side Conduit you can connect to it with a new Conduit client. If you have used the signalr client before, you will recognize a lot of the same methods.
You are able to instantiate a conduit client with the default options:
const conduit = new Conduit();
Or you can provide configuration settings used to change the underlying reconnect behavior.
const conduit = new Conduit({
logLevel: LogLevel.Error,
retryInterval: 3000,
maxConnectionAttempts: 5
});
For more information on these options, please refer to AutoHubConnection.
applyFilter(filterName: string, filter: object): Promise<void>
Call applyFilter
to provide the server conduit additional data points to more accurately send data to the client.
filterName is expected to be the name of the class used in the server conduit to define filterable data for your users.
filter is the actual filter data to be used by the server conduit to filter calls.
start(): Promise<void>
start
initiates a connection with the server Conduit.
on<T>(payloadName: string, callback: (data: T) => void): Promise<void>
on
adds a callback handler for when a specific payload type is provided.
payloadName is type name of the object pushed by the server Conduit.
callback is the method called whenever a payload of that type is pushed.
off<T>(payloadName: string, callback?: (data: T) => void): void
off
removes a handler or all handlers for a specific payload type.
payloadName is the type name of the object pushed by the server Conduit.
callback is the method you want removed whenever a payload of that type is pushed.
import { Conduit } from '@archetypical/conduit'
// Create a new client
const conduit = new Conduit();
// Initiate the connection
await conduit.start();
// Define a callback handler for PageStats
await conduit.on('PageStats', updatePageStats);
// Tell the server you only want updates for specific pages
await conduit.applyFilter('UserFilterData', {
RecentPages: ['Home', 'About', 'Kittens']
});
FAQs
JavaScript client for Conduit
We found that @archetypical/conduit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.