Closed
Description
Echo Version
2.1.3
Laravel Version
11.44.7
PHP Version
8.4
NPM Version
10.9.2
Database Driver & Version
No response
Description
When using notifications with echo-react
, the docs say:
import { useEchoModel } from "@laravel/echo-react";
const { channel } = useEchoModel('App.Models.User', userId);
channel().notification((notification) => {
console.log(notification.type);
});
The function call channel()
returns null until you wrap the call in useEffect
.
Is that intentional?
Steps To Reproduce
laravel new project
php artisan broadcast:install
use reverb with echo-react.
Metadata
Metadata
Assignees
Labels
No labels