lukky954
lukky954
PD🧩 Plasmo Developers
Created by lukky954 on 1/20/2024 in #🔰newbie
How to listen to port with React
I want listening to a port in sidepanel I have check in my background file port and the sender and port handler are correctly configured, the problem is in the receiver I try this
export default SidePanel() {
const port = usePort("node")
useEffect(() => {
...
}, [port)
return <div>Hello world</div>
}
export default SidePanel() {
const port = usePort("node")
useEffect(() => {
...
}, [port)
return <div>Hello world</div>
}
But it don't work and the div is not even rendering, I tried without hook (getPort) and it is the same
4 replies