Replies: 1 comment 1 reply
-
toJSON doesn't give you a fully serialized result, so when you reset, you actually clearing components internally. I'd expect something like this to work based on your need: const rootPage1 = step1Page.getMainComponent();
const rootPage2 = step2Page.getMainComponent();
const componentsPage1 = JSON.parse(JSON.stringify(rootPage1.components()));
const componentsPage2 = JSON.parse(JSON.stringify(rootPage2.components()));
rootPage1.components(componentsPage2);
rootPage2.components(componentsPage1); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here's what I am trying to achieve: I have two pages and I want to switch content between them. If the current selected page is 2, when I select "switch page," it should switch to page 1, and vice versa.
@artf
Beta Was this translation helpful? Give feedback.
All reactions