Background
New thunkers often ask how to duplicate screens or how to copy blocks to another screen. It is often the case that you do not need to do this, and you should instead reuse what you have already created.
I have identified two scenarios where this concept of reusability can help your app use less code and be more dynamic.
Scenarios
Scenario 1 - You want to display the same type of content at different times.
The steps to do this dynamically are as follows:
- Create the content container in the app design.
- Store the dynamic content in a variable or database.
- Set the conditions to show the different content.
- Display the content to the user when needed.
Scenario 2 - You want to use the same blocks or features at different times.
The steps to do this dynamically are as follows:
- Add all the components or features on the screen.
- Create a variable to define when to show each feature.
- Define the conditions to update the variable.
- Add logic to display the feature based on the variable.
Demonstration / Tutorial
Check out this video, if you want to see how I used both of these methods in my app TipTrainer.