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: avoid to pass apikey #277

Merged
merged 2 commits into from
Mar 13, 2022
Merged

fix: avoid to pass apikey #277

merged 2 commits into from
Mar 13, 2022

Conversation

Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Mar 13, 2022

It's used for obtaining the Microlink API URL

const [apiUrl, apiUrlProps] = useMemo(

Since it isn't more necessary after that, it's preferable to don't pass it around components to avoid leaked it accidentally.

Also, because the default value is undefined, react warns users about that:

Warning: React does not recognize the apiKey prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase apikey instead. If you accidentally passed it from a parent component, remove it from the DOM element.

closes #276

avoid pass around component to prevent leaked it
Copy link
Member

@breadadams breadadams left a comment

Choose a reason for hiding this comment

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

👌

@Kikobeats Kikobeats merged commit 747243f into master Mar 13, 2022
@Kikobeats Kikobeats deleted the apikey branch March 13, 2022 21:19
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.

apikey being passed to the Iframe wrapper component
2 participants