Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guifromrio/8a99245f5368fdbd8a32f13bea9243ea to your computer and use it in GitHub Desktop.
Save guifromrio/8a99245f5368fdbd8a32f13bea9243ea to your computer and use it in GitHub Desktop.
How to write a React stateless (functional) component in TypeScript
import * as React from 'react'
const Button = ({children}) => (
<button
className="f4 br2 grow no-underline ph5 pv3 dib white bg-dark-pink bn shadow-3 w-100 w-auto-ns b">
{children}
</button>
)
export default Button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment