Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to TypeScript v3 #1383

Closed
6 tasks done
chandlerprall opened this issue Dec 18, 2018 · 0 comments · Fixed by #1583
Closed
6 tasks done

Upgrade to TypeScript v3 #1383

chandlerprall opened this issue Dec 18, 2018 · 0 comments · Fixed by #1583
Assignees

Comments

@chandlerprall
Copy link
Contributor

chandlerprall commented Dec 18, 2018

TypeScript v3 added support for static defaultProps on React class components. As recommended in https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html (bottom of page) we will move to this pattern for class components, and rely on JS's argument defaults for functional components.

  • update TS version
    • add TS peerDependency targeting v3
  • convert existing functional components to use arg defaults instead of defaultProps
  • update autodoc generation
    • apply defaultProps to the class's interface react docgen un-requires props that have defaults
    • apply arg defaults to component interface react docgen already inspects functional components' arg defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant