reagent

Al M 2024-08-20T17:09:10.323999Z

Hi all, is there any way to figure out what's triggering a component update? I have a form 3 component and the :component-did-update lifecycle hook is getting called continuously but as far as I can tell the state being passed isn't changing. The passed state is derived from a set of re-frame subscriptions all being de-referenced before the component is called.

dmitryn 2024-08-23T20:11:20.921449Z

If state changes in parent component, all the children components are also re-rendered. So I would suggest going up the component tree and check if state gets updated there

p-himik 2024-08-23T21:05:20.246389Z

> If state changes in parent component, all the children components are also re-rendered That's incorrect.

2024-08-30T11:59:30.242249Z

Maybe you encounter the "square vs bracket" case? > The round version causes the greet hiccup for all children to be incorporated into the hiccup returned by the parent, forming one large data structure, parent and children all in together. So, each time the parent re-renders, all the greet children are effectively re-rendered too. React must then work out what, in this tree, has changed. Source: https://github.com/reagent-project/reagent/blob/master/doc/UsingSquareBracketsInsteadOfParens.md#which-and-why

p-himik 2024-08-20T17:19:32.034589Z

You can try using React DevTools.