I’m using forwardRef to pass a modalRef from the component “AllPosts” -> “Posts” -> “Post”,
However, when I try to access the ref value I’m always getting null.
The idea is to forward the ref of the modal so I can open it from the button in “Post” component with its data.
Demo:stackblitz
I have tried using this {modalRef && } but then the Posts component doesn’t load.