I would like to pass a parameter from a main function to a sub function as below.
But it’s does not work.
const Editor = ({postTitle}) {
const title = {postTitle}
console.log(title) //this is working
const subFunc = (title) => {
console.log(title) //it's not working. how can I bring title into this?
}
return (
<div></div>
)
}