In my App.js I have a ref:
const canvasView1 = React.createRef();
...
<div ref={canvasView1}/>
And a route to a Homepage component with the ref as a prop:
<Route
index
path="/welcome"
element={<Homepage canvasView1={canvasView1}/>}
/>
Then, in Homepage.js I use forwardRef() and I log the forwarded ref :
export const Homepage = React.forwardRef((props, canvasView1) => {
useEffect(() => {
console.log('# canvasView1 Homepage.js :', canvasView1)
}, [canvasView1]);
...
}
But it returns null whereas in App.js it returns the object:

I've read the docs about refs forwarding and tried multiple syntax but it still doesn't work.