How to pass state back to parent in React?

后端 未结 7 1417
时光说笑
时光说笑 2020-12-05 04:08

I have a form that has a submit button. That form calls a function onclick that sets the state of something from false to true. I then want to pass this state back to the pa

7条回答
  •  悲哀的现实
    2020-12-05 04:57

    Just to clarify things to me, but why you event call it a callback function, normally a callback function is a function that is received as an argument to another function (it's by definition) and i don't see particularly that myCallback function used here is an argument to another function. Please correct me if i'm wrong!

提交回复
热议问题