I made this tweet and people wanted an article so instead I made a sketch that is about 80% implemented.
- Talk: https://www.youtube.com/watch?v=ZbFOqL1fHNo
- Commit in talk: b7b844a
- Redux sandbox repo: https://github.com/lukepighetti/redux_sandbox
Extend firebase services with backend-like methods that don't act on any service but itself.
Extend FirebaseApp with flows that don't require authentication.
Extend User with flows that require authentication.
Find an easy way to access User and all your services. I like Provider<User>
and mixin FirebaseServices
.
Data goes up, Firebase RTDB acts as a repository, data is dispatched to your streams and to firebase. The architecture is extremely simple and very fast to write and quite powerful.