React+redux official instance Todo from the simplest introduction (6)--end

Source: Internet
Author: User



By implementing an increase-and-delete------the mechanism of react combined with Redux has almost been understood, so take the rest of the functionality together.



Select All



1, state of declaration, this is the state of all selected






2. Action Agreement






3, reducers, update store






4. The underlying component implementation function






5, upper component data transfer






This is where the all-in-choice feature is implemented.



Show the number of action and delete completed action



The whole process is identical.







4, (Show action number of view)






(delete completed's view)






Put it in the footer.






Data communication on the parent component of the upper layer









The final parent component (view)






The whole process is so simple and clear!



All the functions of the official todolist are realized here! In fact, to achieve such a seemingly simple, in fact, a little simple project, the key is to master the Redux Grammar, communication between the react components, there is the basic grammar, logic, a lot of ES6 grammar and some of the less common I have to live in the comments, inside all, my original intention is, we must first understand, Do not see a bit along with the writing, so even if you write the effect, it is not necessarily you master, so you need to understand, and then write, so it is very easy to write, I just started, see a tutorial immediately followed by writing, write write on the problem, go to the code, in fact, this habit is not good, understand and then write Will greatly accelerate your study progress!



React+redux also has a lot of high-level features waiting for our district excavation, in fact, now I feel that I am just getting started, record a flash of this moment, we encourage each other! I hope the comrades who have been fortunate to see this series of articles help!!!






React+redux official instance Todo from the simplest introduction (6)--end


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.