Useless constructors
This was a simple fix, but something that I had a lot of due to making a baseline template with most of the life cycle functions defined as empty functions. […]
This was a simple fix, but something that I had a lot of due to making a baseline template with most of the life cycle functions defined as empty functions. […]
Continuing with implementation of new linting rules, I learned that you can have a ReactJS component that is defined as a stateless function, rather than explicitly as a component. The […]
One of the interesting things I came across with new linting rules is static functions in components. To make the linting happy, I had to add the word static in […]
Building some custom enhancements to existing components, I wanted to use the ES6 style spread props to automatically pass any params through to the underlying base component. However, it was […]
Ran into a strange scenario where I could not get a component to update with data from a Reflux when I defined a componentWillMount() or componentWillUnmount() function. Just a simple […]
Since JavaScript can set a variable equal to a reference of another variable, there are two types of comparisons. Same _.eq will do a same value zero comparison to determine if […]
For persistent storage after closing the browser, you can use HTML5 “sessionStorage”. It only takes simple values, not complex objects (unless you do some JSON to string conversions). Saving something: […]
In my Pokemon application, I am using ES6, which does not support mixins. I noticed that I was using a lot of the same code repeatedly for interacting with my […]
React’s documentation tells us not to manipulate state of components directly, and that we should use setState() to handle any changes. This has two big “gotchas!” that I encountered. 1) […]
If you want to check for a nested property in a complex object, you can do it in a single call with lodash / underscore. Example object: parent: { child1: […]