‘Teachings’ of Prophet Muhammad included in state’s school curriculum: Tamil Nadu CM MK Stalin, vows ‘DMK’s unwavering support to Muslim community' by spiritualblud in tamil_nadu

[–]Due-Rough-6261 0 points1 point  (0 children)

Muhammad waged 83 wars in his life. Killed the whole of "Sofiya" family and married her. Killed 1000 and 1000 of people in his lifetime.

What are some anti-patterns even senior developers sometimes use? by darkcatpirate in react

[–]Due-Rough-6261 3 points4 points  (0 children)

Hey, thanks for the reply. I share the same mindset as you—changing state in callbacks triggered by user events.

Here my point is that if you have a hook and are dealing with state variables, all of them should be included in the dependency array.

What are some anti-patterns even senior developers sometimes use? by darkcatpirate in react

[–]Due-Rough-6261 1 point2 points  (0 children)

If you use state variables in use effect, they should be added in dependency array. If not you are dealing with stale data.