Need to read redux-saga books carefully before writing any real code
Most people are task-driven, including myself. And at the same time, our first thought is to achieve the functionality first. So google related concepts, read quick starts, copy-paste-modify, Boom! It works…
I’m new to react-native and redux-saga, and really impressed by redux-saga architecture. Wow, it processes async operations so beautifully in react-native architecture, leaving Components focus on just one thing — UI. And it turns complex async logical thinking into sync logic. Great Work!
When digging redux-saga official book on github, I find the pitfall in many saga examples, like calling async api and dispatch directly in the saga functions. This will make our test code very difficult. And redux-saga has solutions for that, it need us to dig it!
So for production code, we need:
- quick start
- DIG OFFICIAL DOCUMENT, AND READ THEIR BEST PRACTISE
- write code