Home » Posts tagged "react.js"

3 JavaScript Fallacies You Might Believe

You know, you think the whole world knows something is true until you hear someone people respect say something really dumb.  The three JavaScript fallacies I have here are actual statements I’ve heard over the last week during a discussion about Angular2 and Rect.  What makes these fallacies particularly interesting is that they sound plausible.  In fact, there are time when they are even true.  But in the larger context of a JavaScript application they are nearly always false.

So, here are 3 JavaScript Fallacies you may still believe that you may want to reevaluate.

3 JavaScript Fallacies You Might Believe
Photo credit: bark via VisualHunt / CC BY

Continue reading “3 JavaScript Fallacies You Might Believe”

How Not to Choose a Framework

In my job as a JavaScript architect, trainer and mentor, I’m often asked, “What’s your favorite framework?”  Or “What is the best framework?” And it surprises people when I give them two answers to that question.

Right now, of the frameworks I’ve looked at, my favorite framework is React JS.  But if I were picking a corporate framework, at this point I’d probably land on Angular 2.0.

But the question you are probably asking is , “Why two different selections?”  And, I think a more interesting question would be, “How did you select which one to use?”

In fact, when I was thinking about writing this post, I was going to title it “How to Choose a JavaScript Framework” but as I considered what I would actually say, I realized that the factors I would use really apply to any language and any time.

But an even more interesting question is this.  What factors are essential when picking out a framework.  If I ignored these questions, what are the cost?

So, I give you…

How Not to Choose a Framework
Photo credit: Tony Webster via Visual hunt / CC BY

Continue reading “How Not to Choose a Framework”

ES2015 Code Coverage and Jest (React JS Unit Testing)

As I’ve mentioned before, I’m in the middle of putting together a React reference app and I’m doing it using Test Driven Development.  The problem is, the standard tools for implementing ES2015 code coverage with Jest make it hard to see at a glance if you have 100% code coverage or not because of some issues with the way Jest tells Babel to do the transformations by default, the way Babel transforms the code and implements the auxiliaryCommentBefore option and the way that Istanbul parses the ignore next comments.

I’ve been working on solving this problem for the last month and a half off and on.  I’ve even posted a question about this on Stack Overflow, so I’m pretty sure no one else has a solution for this yet.  I’m not going to say my solution is the best way to solve this problem, but it is a solution, which is better than what we have so far.

ES2015 Code Coverage and Jest

Continue reading “ES2015 Code Coverage and Jest (React JS Unit Testing)”

An Explanation of the Flux Pattern

Over the last couple of weeks, I’ve mentioned that I’ve been learning React JS.  First in the article “Reaction to React JS and Associated Bits” and then last week in my article “Test Driven Learning”.  In the first article,  I mentioned that if you use React JS, you’ll probably end up using the Flux design pattern and since there are multiple ways of implementing flux, getting a clear definition of what it is and how it should work can be confusing.  At least, I found it confusing.

And now that I’ve figured it out, I thought it might be helpful both to myself and to the programming community at large if I offered my own Explanation of the Flux Pattern.  At the very least, it will give me one more way of solidifying the concept in my own brain.  Maybe it will be helpful to you as well.

Flux
Photo credit: jeffreagan via VisualHunt.com / CC BY

Continue reading “An Explanation of the Flux Pattern”