1
00:00:00,000 --> 00:00:04,440
Two components need the same selected tab.

2
00:00:04,440 --> 00:00:07,060
Do I need a global store, or am

3
00:00:07,060 --> 00:00:10,320
I installing a board of directors for a button?

4
00:00:10,500 --> 00:00:13,520
Usually, lift the value to their closest shared parent.

5
00:00:13,520 --> 00:00:15,340
Both read the same value, and the

6
00:00:15,340 --> 00:00:17,380
toolbar asks that parent to update it.

7
00:00:17,560 --> 00:00:19,840
Here, the page owns tab.

8
00:00:19,840 --> 00:00:22,440
Selecting Activity updates that one value,

9
00:00:22,440 --> 00:00:24,040
so the toolbar and panel agree.

10
00:00:24,040 --> 00:00:26,280
There are no two copies to synchronize.

11
00:00:26,460 --> 00:00:29,260
If only that page needs it, keep it there.

12
00:00:29,260 --> 00:00:32,000
Removing that owner resets its local state.

13
00:00:32,000 --> 00:00:35,660
A bookmarkable tab may belong in the address instead.

14
00:00:35,840 --> 00:00:39,200
For distant descendants, Context can pass the value.

15
00:00:39,200 --> 00:00:42,920
A shared store fits independent consumers across the app.

16
00:00:42,920 --> 00:00:44,600
Decide who reads it and how

17
00:00:44,600 --> 00:00:46,160
long it must live first.

18
00:00:46,340 --> 00:00:47,990
Two buttons.

19
00:00:47,990 --> 00:00:49,680
One value.

20
00:00:49,680 --> 00:00:52,860
Somehow we still scheduled a steering committee.
