ReactJS - render called, but DOM not updated

后端 未结 4 2313
终归单人心
终归单人心 2021-02-19 05:55

This has happened to me a few times. I have always managed to work around the issue, yet I am still intrigued to understand why this happens, and what I have missed.

Ess

4条回答
  •  醉话见心
    2021-02-19 06:56

    Can you share the button onClick code? I might be wrong but this looks like an incorrectly set button onClick listener.

    Make sure that onClick callback is defined without (), i.e.

    instead of:

    Post more code so we can get a better (bigger) picture

提交回复
热议问题