React+TypeScript: Use unions of objects for propsPublished byborischerny.comon •1 min readWhen typing React component props using TypeScript, I often see code that makes use of optional and nullable fields:ReactTypescriptUnionsObjectsPropsLearn moreShareLegalReport