Make your apps dynamic with Temporary State
Retool community workshop
Jess Lin (@jesstyping)
aka the when, why, and how of Temporary State
Quick intro
Who is this for?
What we’ll cover
Who am I?
5 examples - opening quiz!
For each example:
Let’s open Retool…
Discussion
Answers
#1, Basic counter: Yes. 1.
#2, Table row details: No.
#3, Modal + Tabs status: No.
#4, Teams explorer: Yes. 2. (1 in theory)
#5 Multiple counters: Yes. 3. (1 in theory)
What’s the general principle for when we need temp state, or not?
When do we need temp state?
When you want to track a variable that can change while a user interacts with your app
… that is temporary—that you don’t want to immediately “save” to your backend
… that Retool doesn’t already provide a built-in way to do.
E.g. each Retool component has a set of properties that update as the user interacts with the component.
Let’s build examples
Let’s open Retool
Review
Example 1: Basic counter
Example 2: Multiple counters
Review
Example 3: Teams explorer
Docs
Summary + Next steps
Next
Questions?
Appendix
Links to example apps
The 4 things we can do with temp state
Similar to a regular variable when you’re programming.
The 3 decisions for each temp state
Decision: What type of data should this be? E.g.
- number� - string� - a list (and if so, a list of what?)� - an object (and if so, what’s the key and what’s the value?)
Decision: What’s the initial value?
Decision: When does this value need to be updated?