Clean Code vs. Dirty Code: React Best Practices

Clean code vs. dirty code: React best practices  #ReactJS

  • This article will focus on clean code practices as they apply to modern React software development.
  • Many React developers rely on Jest for a zero-configuration test runner and to produce code coverage reports.
  • And don’t discount the “rewrite factor” and time spent fixing comments from code reviews.
  • The advantage of letting React set your prop defaults, however, is that it produces more efficient code, defaults props in a based lifecycle component, as well as allows your default values to be checked against .
  • For example, the following component is ripe for converting to an SFC. – – The clean version clears a lot of the screen clutter of the dirty version.

Clean code is a consistent style of programming that makes your code easier to write, read, and maintain. Discover how to make your React code cleaner using easy-to-follow examples.
Continue reading “Clean Code vs. Dirty Code: React Best Practices”

Clean Code vs. Dirty Code: React Best Practices

Clean #Code vs. Dirty Code: #ReactJS Best Practices:  by @donavon #JavaScript

  • This article will focus on clean code practices as they apply to modern React software development.
  • Many React developers rely on Jest for a zero-configuration test runner and to produce code coverage reports.
  • And don’t discount the “rewrite factor” and time spent fixing comments from code reviews.
  • The advantage of letting React set your prop defaults, however, is that it produces more efficient code, defaults props in a based lifecycle component, as well as allows your default values to be checked against .
  • For example, the following component is ripe for converting to an SFC. – – The clean version clears a lot of the screen clutter of the dirty version.

Clean code is a consistent style of programming that makes your code easier to write, read, and maintain. Discover how to make your React code cleaner using easy-to-follow examples.
Continue reading “Clean Code vs. Dirty Code: React Best Practices”

Building an app: React Native vs Ionic – Hacker Noon

Building an app: React Native vs #Ionic  #ReactJS #JavaScript

  • In this article, we are going to make a comparison of two frameworks, React Native and Ionic, based on our real time experience in frontend development.When developing various products, either for ourselves or for the clients, there has always been a question that interested us: how can we narrow down time and cost of product development.Android and especially iOS developers have always been valued greatly and cost a lot, and when developing for two platforms one has to spend twice as much money.At some point we were experimenting with Cordova, but it didn’t feel as if we can get something valuable out of it.Then we noticed Ionic.
  • Now we would like to give you detailed frameworks comparison and explain you why React Native is better solution for our developers.We were always trying to get more expertise on different technologies and use them in practice in order to define the best solution.
  • We also kept on watching Ioinc2, which was supposed to become an innovation that would solve many issues that we had while working with Ionic1.The approaches of given frameworks are very different but for us React Native is an ultimate winner.We chose main React Native advantages that are superior in relation to Ionic1/2:Response time that could be compared to native apps.Ability to reuse the code parts (not all code) for desktop (web apps) and mobile (mobile apps) and even for the server.
  • (:-))Incredibly convenient toolchain for developers that allows to quickly develop and debug the app.Big amount of elaborated components from Facebook.Even bigger amount of components from community.Ability to realize the ideas of functional programming in development which ensures great stability and reliability of the app and relative scaling simplicity.However, we don’t make a point here that React Native is 100% perfect.
  • We also chose some of React Native disadvantages in comparison with Native Apps:Those code parts that are linked to work with hardware solutions, camera, external libraries integration, etc are still done in Native parts.The interface between javascript and native part is not so simple (but not more complicated than cordova).

When you start to use new technology, you cannot be sure it will be the best solution. In this article, we are going to make a comparison of two frameworks, React Native and Ionic, based on our real t
Continue reading “Building an app: React Native vs Ionic – Hacker Noon”

7 tips of using MobX – Huiseoul Engineering

7 tips of using MobX  #javascript #react #mobx #reactjs

  • These are the very basic building blocks of MobX:observable: is the data that you are expecting to changeobserver: is a component that you want to be re-rendered depending on the observable datacomputed values: are functions returning values based on calculation of observable valuesreactions: many different types of functions that can be executed based on observable values2.
  • In large applications this might cause confusion and make it hard to track down where the data are being changed.Strict mode will give you peace of mindSo MobX provides a strict mode where you can only change your data inside of functions marked as actions can change observable values.In strict mode, only action functions can change observable values5.
  • MobX document suggests:one store for app-wide UImultiple stores for each domainStore states in storesIt means that you might want to have UiStore or AppStore for your app-wide, UI data, and other domain stores for each of your domain like UserStore, ProductStore, BrandStore, etc.7.
  • Having MobX, and introducing new concepts and using separated stores might get your app overly-complicated otherwise simple react components talking to each other.So if you start from scratch you might try to solve the problem of state management without MobX first then start to use it if you see the clear benefit for all of your colleagues.Even after introducing MobX in your app, consider using local states for simple view-only states like isLoading or isDisabled.
  • It might be better solution than MobX if you are working with explicitly time-based data among other situations.Redux is a predictable state container for JavaScript appsHappy coding!

MobX is a convenient tool that you can use in React projects to manage states across components. Here are 7 tips we have learned along the way we have built our app at Huiseoul using MobX for our…
Continue reading “7 tips of using MobX – Huiseoul Engineering”

Why props are your friend!

Why props are your friend! => 

{ Story by @RockChalkDev }

🍻 #ReactJS #JavaScript

  • The way this works is that when the user comes to the Home page they are greeted with four images that represent their respective collection.
  • When the user selects one of the four images on the Home page an async method, , is called.
  • This function is responsible for two things:

    When the user gets to the Portfolio page they are greeted with a Carousel displaying the images.

  • The Porfolio component is connected to the Redux store so it has access to the app state in our case we want .
  • Below you an see what looks like on a user’s selection:

    The Redux store doesn’t have that information avaliable in state.

This the first time I’ve ever done a blog post, I guess this is a blog post. I wanted to share this because I’m pretty impressed with my use of props &.
Continue reading “Why props are your friend!”

Javascript Fatigue – Eric Clemmons – Medium

#Javascript Fatigue:  by @ericclemmons #ReactJS #Redux

  • Instrumenting tooling should aim to be as minimal as possible .
  • Yeoman & Plop can alleviate the amount of copy & pasting you do between projects.
  • When a generator is good solution for repetitious code, a better solution is to abstract it into a simpler API.
  • I say “painstakingly” because every project required decisions to be made around tooling depending on the scope & needs.
  • Even if contained in a “boilerplate” project, scaffolded by a generator, or tucked away in a finalCreateStorev3SeriousThisTime.js file, we’ve created a rat’s nest of wiring that would make WordPress plugins blush.

At work this past quarter, we painstakingly started three new projects at work. I say “painstakingly” because every project required decisions to be made around tooling depending on the scope & needs…
Continue reading “Javascript Fatigue – Eric Clemmons – Medium”

Javascript Fatigue – Medium

#Javascript Fatigue:  by @ericclemmons #reactjs #Redux

  • Instrumenting tooling should aim to be as minimal as possible .
  • Yeoman & Plop can alleviate the amount of copy & pasting you do between projects.
  • When a generator is good solution for repetitious code, a better solution is to abstract it into a simpler API.
  • I say “painstakingly” because every project required decisions to be made around tooling depending on the scope & needs.
  • Even if contained in a “boilerplate” project, scaffolded by a generator, or tucked away in a finalCreateStorev3SeriousThisTime.js file, we’ve created a rat’s nest of wiring that would make WordPress plugins blush.

A few days ago, I met up with a friend & peer over coffee.
Continue reading “Javascript Fatigue – Medium”

Redux and The Command Pattern – Front-end developer – Medium

Redux and the command pattern:  #ReactJS

  • The Command Pattern is a great pattern for architecting really clean decoupled systems.
  • There are several elements to the Command Pattern: the Receiver , Command , and the Executor .
  • Let’s get into the Command Pattern, then translate this to Redux.
  • Knowing the Command Pattern makes learning Redux a lot easier!
  • Design patterns represent the best practices used by experienced software developers.

Read the full article, click here.


@ReactiveConf: “Redux and the command pattern: #ReactJS”


There are two things I know for absolute certainty in the Software industry.


Redux and The Command Pattern – Front-end developer – Medium