mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
2bc8ce1549
Summary: Changelog: [internal] # What is Teller? Teller is a bank's employee who deals with the customer on behalf of the bank. In Fabric's scenario it is a class that on behalf of the view deals with State. # Why do we need it? Dealing with `ConcreteState` can be complicated and patterns are often repeated among different component views. `ConcreteStateTeller` aims to resolve these issues. Examples: - You can call teller's methods without checking for nullptr (we have had crashes because of this before). - Methods are save to be called on any thread. - Mechanism to retry state update if it fails is built in. It is designed to be used from ComponentView so views don't have to talk directly to `ConcreteState`. Reviewed By: JoshuaGross, shergin Differential Revision: D23216865 fbshipit-source-id: 90a50702e036eac084f89743ebab687a67182dc0