King_codes
TTCTheo's Typesafe Cult
•Created by riccardolardi on 6/7/2023 in #questions
React guarantee updated state variable
Isnt this solved via adding that state as a dependency to another useCallback function?
15 replies
TTCTheo's Typesafe Cult
•Created by yellowhammer on 6/5/2023 in #questions
Rich Text Editor
I wouldn't recommend Draft, look into TipTap. I'm actually working on a fairly complex web app and implemented it. It's a nice RTE because it's headless
27 replies
TTCTheo's Typesafe Cult
•Created by deforestor on 5/30/2023 in #questions
Conditional render, why can't it be done?
Actually quite an interesting question, but I guess even though
Loader
component checks if data exists before rendering the children, typescript is performing static type checking based on your code structure so it would not be able to infer the dynamic runtime behavior of your current code. So it is likely just considering the possibility that data might not be an array or undefined when it encounters profitabilities.map
so it would raise an error based on assumption as well that profitabilities
could be undefined or not an array. just my opinion15 replies