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: Replace old prototype-based "defaultProps" with JS default parameters #296

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AleTid5
Copy link

@AleTid5 AleTid5 commented Sep 11, 2023

Proposed Changes

In the index.tsx file, the ReactInstaStories component currently uses ReactInstaStories.defaultProps to define default props. This approach triggers a console.error warning, as it will be deprecated in future major releases. This PR addresses the issue by replacing the deprecated approach with JavaScript default parameters.

Context

The existing code generates a console.error warning due to the deprecated usage of ReactInstaStories.defaultProps. This warning will be removed in upcoming major releases. To ensure code maintainability and align with modern best practices, the code is updated in order to use JavaScript default parameters.

Checklist

  • Replaced deprecated ReactInstaStories.defaultProps.
  • Implemented JavaScript default parameters for default prop values.

Screenshots

image

@vercel
Copy link

vercel bot commented Sep 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-insta-stories ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2023 7:01pm

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.

1 participant