DEV Community

幻魂
幻魂

Posted on

Traditional hook vs concent hook in React

Star Concent if you are interested in it, I will appreciate it greatly.

Recently I updated the README file, hope you guys like it, especially I add 2 group comparative examples to show how powerful and interesting it is when you writing react app with concent.

  • group 1: traditional hook calculator vs concent calculator
    show how the module configure separate logic from UI.

  • group 2: traditional hook query list vs concent query list& concent shared query list
    show the power of setup feature.
    setup will only been executed before first render, usually for defining some effects or return methods that user can get them from ctx.settings later, so there is no temporary closure method any more in your render function block,
    and setup can pass to class and function both, that means you can switch your component definition way between class and function as you like,reuse business logic elegantly。

how Concent works

Top comments (0)