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

Conflicting deprecation warning vs typing of onInit in React library #1294

Closed
FoodProduct opened this issue Jul 16, 2024 · 2 comments
Closed
Labels

Comments

@FoodProduct
Copy link

Describe the bug
At runtime, I receive the error message

Deprecated Option

The onInit() function is deprecated and has been replaced with onReady(). It will be removed in a future version of iFrame Resizer.

but the type IframeResizerProps has onInit and no onReady

To Reproduce

  1. Using @iframe-resizer/react@5.1.5, render an <IframeResizer> with an onInit in the props.
  2. Check dev console for warning logs

Expected behavior
I expect either:
onReady to be an available option in the props
OR
onInit to not throw a deprecation warning

Screenshots
Screenshot 2024-07-16 at 10 48 14 AM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version: 126.0.6478.127

Additional context
This might just be a discrepancy between the React version of the library and the underlying parent library. Thanks for the great library!

@davidjbradshaw
Copy link
Owner

Good spot, and just five minutes after I released v5.2 (Arrgh) :)

I will update the typings to onReady.

@davidjbradshaw
Copy link
Owner

Fixed v5.2.1

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

No branches or pull requests

2 participants