Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not quite understanding how the component determines whether it should redraw itself in this example. The component gets redrawn when the render function is called (if the data it's passed is different and if the output of the render changes) and the render function gets called when a "swap" event is raised, which is raised when a component updates the app state, but it's not saying "please redraw me now". It's not aware it's getting redrawn, it just happens.

Unless I've mis defined what "letting the component determine it needs to redraw" means in this context.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: