Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
React Conditional Rendering with Type Safety and Exhaustive Checking (lloydatkinson.net)
1 point by lloydatkinson on Nov 27, 2022 | hide | past | favorite | 1 comment


I wanted to share this nice TypeScript pattern when using React for conditional rendering based on a union type




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: