
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
react-adonis-transmit
Advanced tools
🚀 Seamless Server-Sent Events integration for React applications using AdonisJS Transmit.
npm install react-adonis-transmit
import { TransmitProvider } from 'react-adonis-transmit'
function App() {
return (
<TransmitProvider
baseUrl="http://your-api-url"
// Optional: Handle auth token
accessTokenKey="access_token"
// Or use a custom function to get the token
getAccessToken={() => localStorage.getItem('my_token')}
// Optional: Handle messages globally
onMessage={(channel, event) => {
console.log(`Message from ${channel}:`, event)
}}
// Optional: Enable logging
enableLogging={true}
>
{/* Your app components */}
</TransmitProvider>
)
}
import { useTransmit } from 'react-adonis-transmit'
function MyComponent() {
const { subscribe } = useTransmit()
useEffect(() => {
// Subscribe to real-time updates
const unsubscribe = subscribe('my-channel', (event) => {
console.log('Received event:', event)
})
// Auto-cleanup on unmount
return () => unsubscribe()
}, [])
return <div>My Component</div>
}
| Prop | Type | Description |
|---|---|---|
baseUrl | string | Required. Base URL of your Adonis API |
accessTokenKey | string | Key for auth token in localStorage |
getAccessToken | () => string | null | Promise<string | null> | Custom token retrieval function |
beforeSubscribe | (request) => void | Promise<void> | Hook to modify requests before subscription |
onMessage | (channel, event) => void | Global message handler |
enableLogging | boolean | Enable debug logging |
We welcome contributions! Feel free to:
To release a new version:
# For a patch release (0.0.x)
npm run release:patch
# For a minor release (0.x.0)
npm run release:minor
# For a major release (x.0.0)
npm run release:major
This will:
Note: Make sure you're logged in to npm (
npm login) and have the necessary permissions before publishing.
MIT © Alexis Faure
FAQs
React context and hooks for Adonis Transmit
The npm package react-adonis-transmit receives a total of 26 weekly downloads. As such, react-adonis-transmit popularity was classified as not popular.
We found that react-adonis-transmit 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.