Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import React, {Component} from "react";
type State = { count: number };
type Props = {
someProps: string & DefaultProps;
}
type DefaultProps = {
name: string
}
class Counter extends Component<Props, State> {
static defaultProps: DefaultProps = {name: "John Doe"}
state = {count: 0}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment