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

Fixing react defaultProps #266

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

lucant
Copy link

@lucant lucant commented Jan 20, 2025

Related #265
This pull request includes several changes to the src/index.js file, primarily focusing on refactoring the Footnotes and FootnotesProvider components. The most important changes include the introduction of default component parameters, removal of defaultProps, and refactoring for cleaner code.

Refactoring components:

  • src/index.js: Introduced default component parameters for Footnotes (Wrapper, Title, List, ListItem, BackLink) to replace the use of defaultProps.
  • src/index.js: Removed defaultProps from Footnotes and FootnotesProvider, as default parameters are now used directly in the function signatures. [1] [2]

Code simplification:

  • src/index.js: Simplified the Footnotes component by directly destructuring the default component parameters and removing the redundant props parameter.

@KittyGiraudel KittyGiraudel merged commit abdaf57 into KittyGiraudel:main Jan 20, 2025
1 check passed
@KittyGiraudel
Copy link
Owner

Thank you. :)

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.

2 participants