Tutorial on how to make a custom React renderer #ReactJS

Tutorial on how to make a custom React renderer  #ReactJS

  • This is a small tutorial on how to build your custom React renderer and render the components to the host environment you need.
  • In part three, we will build a function that will parse the input component and will return the output (rendered children and props).
  • In part four, we will create a render method which will render our input component.
  • We will create a custom renderer that will render a React component to a word document.
  • It generates a output stream and not a file.

Making-a-custom-React-renderer – Tutorial on how to make a custom React renderer
Continue reading “Tutorial on how to make a custom React renderer #ReactJS”

The Pros and Cons of ReactJS for your Online Business

The Pros and Cons of ReactJS for your Online Business  via @janlgordon

  • With React, it is possible for webmasters and online business owners to develop large web-based applications that change data while reloading pages.
  • Webmasters can also use React together with other forms of frameworks or JavaScript libraries like Angular in MVC.
  • It makes it possible to reuse components that didn’t produce changes, and this makes programming more comfortable and precise for online business owners.
  • The great news for webmasters is that Google might still find the React component when just the client-side is rendered.
  • ReactJS is a great framework for online business.

This isn’t quite a ReactJS guide for the layman. But it is a useful for business owners, if only to glean enough to know how to talk with your techie
Continue reading “The Pros and Cons of ReactJS for your Online Business”

How to learn React Native

  • React Native is the hot topic these days for building mobile apps.
  • Learning ES6 makes it much easier to write React and React Native code.
  • The main things you should have learnt after completing the tutorial are Lifecycle of a React Component and what are props and state – – React Native uses Flexbox layout style to render views in a much easier and responsive way.
  • Since an important function in mobile app is how to navigate between screens, it is important to know how it’s done in React Native.
  • As of this writing, RN recommends to use libraries like ReactNavigation and React Native Navigation to use same code for both Android and iOS.

Here is a small guide for Android/iOS developers on how to learn React Native.
Continue reading “How to learn React Native”

busypeoples/Flow_Chapter_One.md Last active Aug 30, 2017

  • Now that we have type definitions in place, let’s start to build the game.
  • One interesting thing to note is that we needed to give Flow a type definition for the React Component .
  • Our TicTacToe component will keep state of the current game status as well as the board.
  • Our next steps will include refactoring the board and cells to their own respective components and we will add interactivity, so player’s can take turn and start playing.
  • Although it seems like a lot of work is involved upfront for definining and displaying a simple 3 x 3 board, we can already guarantee that the board has 3 rows containing 3 cells.

Why does it make sense to use FlowType or TypeScript when working with JavaScript?
A good approach in answering this question is to build a small game or application
to make the benefits clear.
Continue reading “busypeoples/Flow_Chapter_One.md Last active Aug 30, 2017”

Extracting Logic from React Components

Extracting Logic from #ReactJS Components:  by @Jack_Franklin #Javascript

  • Right now to test formatting of amounts I have to create and mount a React component, but I should be able to just call that function and check the result.
  • Let’s create which will house the function that is currently in our component.
  • To test this, we can replace the body of ’s so that it just calls the new function from our module:

    Notice that I’ve still left the function defined on ; when pulling code apart like this you should do it in small steps; doing it like this decreases the chance of inadvertently breaking the code and also makes it easier to retrace your steps if something does go wrong.

  • Sure, the function is very straightforward for now, but as it grows we can now test it very easily without any need to fire up a React component to do so.
  • By looking through our components and finding standalone functions that we can pull out, we’ve greatly simplified our component whilst increasing our test coverage and clarity of our application greatly.

In the previous screencast we took a React component that was doing too much and refactored it, splitting it into two components that are easier to maintain, use and test. Although I’d recommend watching that video first, you don’t need to have watched it to read this blog post. You can find all the code on GitHub if you’d like to run it locally.
Continue reading “Extracting Logic from React Components”

Extracting Logic from React Components

  • Right now to test formatting of amounts I have to create and mount a React component, but I should be able to just call that function and check the result.
  • Let’s create which will house the function that is currently in our component.
  • To test this, we can replace the body of ’s so that it just calls the new function from our module:

    Notice that I’ve still left the function defined on ; when pulling code apart like this you should do it in small steps; doing it like this decreases the chance of inadvertently breaking the code and also makes it easier to retrace your steps if something does go wrong.

  • Sure, the function is very straightforward for now, but as it grows we can now test it very easily without any need to fire up a React component to do so.
  • By looking through our components and finding standalone functions that we can pull out, we’ve greatly simplified our component whilst increasing our test coverage and clarity of our application greatly.

In the previous screencast we took a React component that was doing too much and refactored it, splitting it into two components that are easier to maintain, use and test. Although I’d recommend watching that video first, you don’t need to have watched it to read this blog post. You can find all the code on GitHub if you’d like to run it locally.
Continue reading “Extracting Logic from React Components”