News for hackers. Stuff that matters.

HarmonicTons

Re:Why React Re-Renders on Wednesday August 17, 2022 @04:56AM (#32493921)
No. The redux <Provider> component is just a simple React context that uses `children` [1]:

<Context.Provider value={contextValue}>{children}</Context.Provider>

And `children` behave diferently. `children` is a prop and thus not considered as an element of the Provider component, but of the App component [2]. Meaning the components inside `children` will rerender when App renders, and not when Provider renders.

1: https://github.com/reduxjs/react-redux/blob/master/src/compo...

2: https://www.developerway.com/posts/react-elements-children-p...

Agree with everything, but saying Next.js is just enough to create a static page is quite the strech.
Re:DDD Is Overrated on Tuesday March 02, 2021 @03:35AM (#26313159)
If the flaw of DDD is that there is no emphasis on when not to use it, then the flaw of Peter's article is that, according to him, you should never use it ("software should be designed around function rather than domain").

I agree with his point that DDD will restrict an application that could be generic to a specific domain. When you can build something generic you should. But not everything can be made that way.

Also: "someone who should not communicate with humans" is a little bit too much.