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

Getting warning "Support for defaultProps will be removed from function components in a future major release." #230

Open
SharathSreekumar opened this issue Oct 1, 2024 · 2 comments

Comments

@SharathSreekumar
Copy link

Issue

Getting a warning on the browser console "Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.".
This happened post upgrade to the following:

  • React: 18.2.0
  • react-tracking: 9.3.2 (tried downgrading till 9.2.1, below versions require 16.8.0 or 17.x)
  • @types/react-tracking: 8.0.0
    Screenshot from 2024-10-01 14-48-48

Details

The warning is shown on components that either has class component (hence using the decorator @track({<DETAILS>})) and in functional components (using the export default track({<DETAILS>})(Componentx))

On trying with the packages hook, the warning is not shown.
const { Track, trackEvent } = useTracking({<DETAILS>});

NOTE: React project is written in Typescript.

@vishnu-sreenivasan
Copy link

Facing same issue 😢

@vishnu-sreenivasan
Copy link

vishnu-sreenivasan commented Nov 26, 2024

@tizmagik @bgergen may I know whether there is any plan to merge the PR?

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

No branches or pull requests

2 participants