React: Smart component API with conditional props and TypeScript
· ☕ 5 min read · ✍️ Iskander Samatov
Using TypeScript and conditional props, you can build an API for your React components that is clear and explicit about its prop requirements.