How i can pass props in two hook components?
I have a root component that uses a Modal, i need to pass to my Modal component the props title and show in the component:
<Modal title="test" />
In the modal component, i'm receiving the props as a parameter:
const Modal = (title) => {
return (
<h6>{title}</h6>
)
But i'm receiving undefined.
I also tried with {} :
const Modal = ({title}) => {
Why?