I have:
function Button(){
/*.. useQuery ...*/
const onClick = props => (
console.log(props.target.value)
)
return(
/* ... */
<button value={id} onClick={onClick} >details</button>
)
}
I want to pass props.target.value to class react.component. where it will be used to display popup.
I want something like:
class Details extends React.Component{
/* if thereIsID == 0 then "" or if thereIsID == not 0 then show popup with data according to props.target.value */
}
I used many different variants.. Maybe I am trying not right approach?
Can you recommend something?