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

Fix/695 linked article on default props docs paywalled #733

Conversation

Nileshshinde09
Copy link

Pull Request Description

This PR resolves #695 in the repository.

Summary of Changes

This PR addresses issue #[issue number] by revamping the defaultProps documentation page. The following updates have been made:

  • Updated the content to discourage the use of defaultProps for function components, following the recommendation from Dan Abramov.
  • Linked to the official React documentation for specifying default values for props.
  • Provided clear examples for both function and class components on how to implement default values.
  • Included updated TypeScript typing guidelines for default props to ensure compatibility and better type inference.

Additional Notes

I’ve ensured that the changes adhere to the contribution guidelines specified. Please review and let me know if any further modifications are required.

Screenshot 1
Screenshot 2
Screenshot 3

Thanks for considering my contribution!

Copy link
Collaborator

@filiptammergard filiptammergard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn.lock is changed and there are a bunch of formatting changes as well. Please only make relevant changes if you want to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linked article on defaultProps docs is paywalled
2 participants