dimalmighty

@dimosf.bsky.social

Starting in 19, you shouldn’t need to fetch in an effect for any of these use cases. Initial GET should be cached and read in render with use(). Refresh GET should clear the promise cache to trigger with use() again. POST/PUT/DELETE mutations should be done in event handlers with actions.

React experts help! Say I have a component that accepts a ReactNode as a prop (not children). Is it valid to use React.Children to get the prop component's children? Use case being setting different layout depending on that component having children or not