Skip to content

Method to destroy SDK #181

Closed Answered by lucmantovani
copEquifax asked this question in Q&A
Aug 18, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hello @copEquifax!

We understand your situation
Currently there isn't a method to destroy the SDK instance, but there is a possible alternative

Instead of always creating the SDK in this reusable component you could have a single instance for your entire application (have a look about this pattern here)
With this single instance you can create and "destroy" instances of Bricks, Card Form or even Fields, because each one of them has the mount and unmount methods.

In summary:

  1. When your app starts, create the instance of the SDK
  2. When there is the need to add the card, mount Bricks, Card Form or Fields
  3. When finished, unmount Bricks, Card Form or fields

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@copEquifax
Comment options

@lucmantovani
Comment options

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