Skip to content

Payment Brick unmounting on any position displacement #207

Closed Answered by AleFossati
AndAccioly asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @AndAccioly.

I have tried a new implementation of the Payment brick and it seems to me that it is working fine even resizing the page multiple times.
Here's the link of the public implementation, so you can check it out.

The re-renders is a super common issue when using react, but it is mostly related to the state management of your application.
Maybe it's something related to some useState that you have in your component, or even a parent component.
Here's some guides that we recommend the reading to understand it better.

React.dev - Memo
Medium - React Components rendered twice
Medium - Wait, you’re not using <React.StrictMode>?!

If you have any other question, let me know.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by AleFossati
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants