basarat / basarat/typescript-book
ReactJS Default props
Open
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
``` ts
interface PageProps {
foo?: string;
}
export class PageComponent extends React.Component {
public static defaultProps: PageProps = {
foo: "default"
};
public render() {
return (
Hello, world
);
}
}
```
Contributor guide
Research direction
The issue contains only a TypeScript React component example and names no file, test, or requested outcome. First clarify whether it seeks documentation or a correction about defaultProps; then locate the relevant React and TypeScript book section and define the expected example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100