onRenderTriggered doesn't trigger on a primitive prop change
Version
3.2.31
Reproduction link
Steps to reproduce
According to docs, I expect any props change will trigger this hook, but it doesn't happen on change primitive prop, with add array element or object property.
What is expected?
onRenderTriggered triggers
What is actually happening?
it doesn't
Is this a bug?
According to the document onrendertriggered, when render effect to be re-run, onRenderTriggered
will be called.
However, in the development environment, props will be shallowreadonly, so using the original type will not trigger track, so when changes occur, effect will not be triggered Run, there is no way to trigger the onrendertrigged callback. At present, the normal rendering is updated through patch. I try to start recursive update, but this will make the component update function call twice.
I also hope to get an answer