Another approach is to use extensible records, which give you structural typing similarly to Typescript.  This means that you can pass the exact same state record&#x2F;object around to different components, but a particular component might only specify that the state needs to have a `user` property, whereas another might only specify that the state needs to have a `friends` property.