Skip to content

Error using Checkout bricks on React #132

Closed Answered by icaldana
gabrielschubert asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Gabriel,

As you are already aware, the Brick needs a container to be rendered and the same container's name should be used when calling bricksBuilder.create, in your case, the div with className "cardPaymentBrick_container". Please see the official documentation for further details.

About the error you are seeing, I believe it is caused by the conditional. The Brick is trying to find the container on page load while React is still mounting or/and the conditional isn't true. I would recommend you to place the container outside of conditionals and use additional classnames if you need to hide or do some logic based on this if.

Thank you

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@gabrielschubert
Comment options

@icaldana
Comment options

@gabrielschubert
Comment options

@icaldana
Comment options

Answer selected by gabrielschubert
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