classname
JavaScript: managing events (dispatch, listen)
As a huge fen of the flash platform, I always like to work with events. The events system in ActionScript3 is really helpful when we are building a big application with many modules and we want to keep them independent. JavaScript hasn't native support of events, but we can still use them.Children in JSX
(This article is part of React in patterns series.)
React is highly composable. And the API that enables that is props.children
. It gives us the power to create a placeholder that is later filled with content from the outside.