Just saw this and thought it was funny lol where are Ariel and the beast and she wants wedding cake

2025.01.20 18:52 Actual-Addition-1821 Just saw this and thought it was funny lol where are Ariel and the beast and she wants wedding cake

submitted by Actual-Addition-1821 to DreamlightValley [link] [comments]


2025.01.20 18:52 hatena56 Festival di Sanremo 2025, le pagelle dopo il primo ascolto delle canzoni - tutti i voti

Festival di Sanremo 2025, le pagelle dopo il primo ascolto delle canzoni - tutti i voti submitted by hatena56 to Italia [link] [comments]


2025.01.20 18:52 Physical_Company9853 Warning about using React.ComponentProps with any

⚠️ Never use React.ComponentProps without applying Omit if T can be a React.JSXElementConstructor ⚠️
When using React.ComponentProps with generic components in TypeScript, always make sure to omit any. Otherwise, TypeScript might infer any types into your component props, which defeats the purpose of type safety and can lead to unpredictable behavior and hard-to-debug issues.
Note: The key idea is to use it with Omit. Omit will take care of this for you, so it can't be: Omit, "">.
The issue arises when T is a generic type like React.JSXElementConstructor, which introduces any into the props. To avoid this, you need to use Omit to ensure that any is excluded from the generated types, thus keeping your code strictly typed and error-free.
Example of best practice: type CompProps> = Omit, any>;
👉 Why is this important?
Without Omit, TypeScript might infer props with any, which goes against the purpose of TypeScript types (ensuring safety and predictability in your code). This can create hard-to-detect bugs and degrade the quality of your code in the long run.
Always apply Omit when working with React.ComponentProps and generic components. This will save you hours of debugging and help you maintain better type robustness in your code.
Example (with and without Omit):
Given: