React and TypeScript
Optional props
A property marked optional can be omitted from the prop object.
Formal Syntax & Structure
react syntaxreact
room?: stringWorking Example
Example Snippetreact
room?: stringA property marked optional can be omitted from the prop object.
room?: stringroom?: string