Skip to main content
Shane
Feb 26, 2021 6:30 PM UTC

LAUNCHED: State management for prototypes

Just struck a pretty simple use case/scenario where I need the component to reset it’s state when I leave the frame. This has been touched on elsewhere, but this is such a common and key use that I thought I’d put it in it’s own thread.

Scenario:
I’ve got a dropdown menu with three items in it, with each item changing what columns are visible in a table and some other control states. I have three frames, each with a view of the table setup as it should be, and want to use the dropdown items to navigate between the frames - basically faking the table state change. All of this works perfectly, however when I navigate back to a previous table view state, the dropdown component is already in it’s open state - not what I want.

Current workaround: none that I can come up with (other than not using interactive components at all for this, and just using multiple frames for the dropdown open/closed states as I would previously)

Suggestions:

  1. Have a “reset component on leaving this frame” setting for instances of a component on a frame - useful for this situation and others, but needs to be a setting so that components that should keep their state between frames can do so (light/dark toggle maybe? Something like that).
  2. Do it all in a single frame, with the dropdown component changing the the state of the table component - no frame navigation required. Would work nicely for the particular use case I’m working with here, but not sure it would solve all similar situations.
  3. Do both 1 and 2. This solution is my preferred solution 😉 😆

EDIT:
Other threads that relate:

205 replies

Krzysztof_Juszkowski
Mar 2, 2023 4:43 PM UTC

+1 this feature would be a blessing

Travis2
Active Member
Mar 3, 2023 3:40 PM UTC

This is a pretty basic function of prototyping and people have been talking about it here for two years.

Mar 7, 2023 10:07 AM UTC

+1 …I need to have a tiny animation that runs every time I enter a screen. My prototype is complex enough already, so always moving to a different Screen just for that is ludicrous.

Stephen_Fox1
Mar 7, 2023 5:58 PM UTC

I adore Figma, but I’m puzzled by this missing feature.

Manuela_Mesterhazy
Mar 7, 2023 7:39 PM UTC

+1, lots of errors happen because of that on click and hover states for any library component because it falls back to the original component value

Mar 8, 2023 3:45 PM UTC

Please fix this March 2021- March 2023

Jeffrey_Dunn
Mar 8, 2023 6:30 PM UTC

+1, this would be a super useful tool even with some limitations

Yong_Kim
Mar 9, 2023 3:03 AM UTC

+1 for this feature! love to have this feature soon.

Mar 9, 2023 7:29 AM UTC

+1 for this important feature, great job to the team that provides so much improvements into Figma

Tys
New Member
Mar 14, 2023 11:52 PM UTC

Massive +1 🙏🙏🙏