Eleni Chappen

Redux Lessons for Newcomers

Jan. 6, 2017

Most of our React projects require managing overall application state. While there are certainly other tools out there that do this, we prefer Redux.

You don't need Redux for everything

When we started using Redux, we had this penchant for putting all of our state into it to provide a consistent way of handling state. This was a mistake because it was total overkill to have to dispatch actions for everything.

As the creator of Redux said -- local state is fine!

Redux is appropriate for data that has to be shared between higher-level/container components. If we think of props in React as data being filtered through a tree of components, Redux allows you to easily transfer data between branches of this tree. That being said, we try our best to ensure that our high-level components have all the information they need to pass, but that's a difficult thing to anticipate as a product changes over time.

UI conditions for components (i.e. showing or hiding a dropdown) should be kept in local state whenever possible. We usually start building a component with state, and if we have to, extract out to Redux as needed.

Break your Redux into manageable chunks (Modules)

For instance, a lot of our projects involve complex, multi-step forms. We've found that separating the form data (the data being collected) from the form mechanics (like what step of the form someone's on), helps keep the Redux data easier to visualize and manage.

One other Redux tip: If you're already using Redux and you're console-logging your state all the time... STOP RIGHT NOW and take advantage of Redux Dev Tools. It makes your debugging so much easier.

Things you may not need but might want to consider using:

Redux Thunk (middleware)

You will inevitably have times where you need to dispatch multiple actions with one action. Redux Thunk allows you to do this.


We've been using ImmutableJS intermittently for a while, but this post from Affirm gave us a better understanding of how it can greatly improve your Reducer functions.

Babel Presets

Using a javascript compiler like Babel allows you to take advantage of a lot of new, shiny ES6 and 7 functionality. There are many presets to choose from, but one we've ended up using a lot is Babel's Function Bind Transform preset.

Since we often have to bind functions to their present component's context when defining them as props in React, using ES6's Function Bind operator (::) with this makes code a bit cleaner. So instead of:


you can do:


Keep in mind that a lot of functionality found in Babel presets is experimental and subject to change. For this reason, we prefer to pick and choose what presets we want to use (listing them out in our .babelrc file), as opposed to using a single preset like any of the 'Stage-X' presets. This way we can be more explicit about the experimental functionality that we're adding to the project, and it takes some of the mystery out of the debugging process.

If you haven't seen it, check out part 1 of this series, React Lessons for Newcomers.

Eleni Chappen

What People Are Reading



Watch us eat our own dog food

20spokes is trying a new diet, so to speak. If you’re unfamiliar with the phrase “eating your own dog food,” it’s a common expression in the software world referring to a developer’s practice of using their own products. It’s said to have originated from 1970s television advertisements for Alpo dog food, where the owner of the company would make a point of feeding Alpo to his own dogs. So in its broader interpretation, “practice what you preach” would be an appropriate alternative. Either way, if we can help others build great products, we want to show that we can build our own great products as well.

It’s something we’ve thought about for a while, and now we’re finally taking the steps to make it happen. Client work will still always be our primary focus, but we have the team, the experience, and the aspirations; why wouldn't we work on our own ideas too? Like our clients, though, we don't want to jump into these ventures haphazardly only to end up with a well built app that nobody else wants. So we're putting these ideas through the same process of discovery, validation, and planning that we would with anyone who came into our office. In a way, by becoming clients of our own process, we’re getting our first helping of dog food!

Over the last week or so, we’ve adopted the mindset of a founder with a vision, and taken one of our ideas through the first steps of conception. Working through this process as the “founder” has already given us some great new insight, and we're excited to share this journey with you. So stay tuned for the next several weeks as we document all the steps we take and lessons we learn along the way; we're going to find out just how good our dog food tastes.

Trying to get your own product idea to market? Contact us to learn more about our process and how we can help.



ChangeMaker Launches!

In a world where marches and protests are making weekly headlines, people are always looking for the next cause to get behind.

But what do you do when a cause or issue you’re passionate about needs more awareness and support? How do you find people to come together? How do you organize people, activities, events, and whatever else you might need to do? And if you do find people, how do you manage all the different moving parts?

And, well, what does that have to do with us at 20spokes?

Meet ChangeMaker -- a project we recently completed and launched.

Similar to sites like Kickstarter or Indiegogo, ChangeMaker allows organizations to add a project and find fellow activists to donate to or join the cause as a volunteer. The interface provides organizations the ability to detail an issue or problem, outline a solution, and how donors or volunteers can help. When people join the project as a volunteer, they can specify their particular skillset in fields such as marketing, design, legal, or data so project managers can delegate tasks to the right people.

With funding from donations, users can work on projects for their cause by using the free website. While most project management tools have some sort of fancy, pay-to-use features, ChangeMaker is completely free to use because it is donor funded and donor maintained.

We branded, designed, and coded the ChangeMaker platform in a Rails environment. We also integrated Stripe Connect, which enables organizations to receive those donations they need to power their projects.

Putting all this together sounds like it would take a good chunk of time, right? But we kicked off this project on August 8 and launched the website this week. A little more than two months. Not too shabby, eh? Just in time for the Newfounders Conference. ChangeMaker will have a big presence at the conference with donors ready to help out organizations that have ready-to-pitch projects for its demo night. Nothing is too small or too large for ChangeMaker to help its users and organizations tackle.

Give ChangeMaker a whirl at



Good Founders Make Good Clients - 5 Traits We Look For

“Ideas are easy. Implementation is hard.” – Guy Kawasaki

As a development agency that primarily works with early stage startups, we hear all kinds of business ideas. You could even say that we're in the business of building business ideas; but only one's we believe will succeed, and not on our own. We know that, without a good founder to drive implementation, even the best ideas will surely fail. In fact, most give up at the first sign of real challenge, and their ideas never see the light of day. So while we spend time evaluating the viability of the idea, we must also consider if the founder has what it takes. Here are the 5 traits we look for:

1. Tenacious belief. Some traits can be learned or honed; this is not one of them. Startups are inherently difficult, demanding, and full of unknowns and disappointment. To make it through, a founder needs confidence, determination, passion, and the like - things you can't have without first believing. We're not talking about simply believing you have a good idea. We're also not talking about blind belief to the point of delusion. This is believing strongly enough in your vision that, despite the uncertainties and inevitable struggles in your path, you will do whatever it takes to see it through.

2. Domain expertise. Serious founders need to understand their market as much as possible. Ideally, you can directly relate to the problem you're trying to solve - or - you have extensive experience that gives you insight on your target market. Even then, the best founders do everything they can to consistently learn and absorb new information.

3. Communication. The greatest entrepreneurs are masters of communication. Not all start out that way, but its something to be conscious of and constantly improve. A good founder has the ability to communicate clearly, confidently, and candidly. They can clearly explain their thoughts and ideas. They use confidence to sell themselves and their vision, as well as to lead others. They can candidly express their feelings, while maintaining control of their emotions.

4. Head in the clouds, feet on the ground. Growing a startup requires constant innovation. A good founder has vision; they dream big and consistently ask themselves, "what's next?" However, that vision will never materialize unless a founder can execute in the present. A good founder can keep their eyes to the future while practicing self awareness, focus, patience, and responsible decision making.

5. Flexibility. The survival of a business, like in nature, depends on its ability to adapt. No matter how much a founder plans, new information will arise and circumstances will change; a good founder is prepared and willing to respond. Some changes will inevitably result in failures. A founder must have the resilience to pick themselves up, learn from the failures, and push on.

6. Enjoys the ride. I know I said 5 traits, but this one's pretty important too. Yes, starting a business is difficult, risky, blah blah blah...but what's the point if you can't enjoy it? Having fun will not only make your life (feel) easier; attracting advocates, customers, employees, and investors will be easier as well.

Now these aren't the ONLY things a founder needs to build a successful business, nor do they guarantee success, but we'd bet on you. So if you have a great idea and "what it takes" (see above), we should meet.