The Observer Pattern In Javascript

  • The observer pattern, also referred to as the publish/subscribe pattern, is a design pattern where an object (called the subject or observable), will maintain a list of “dependents” called observers.
  • This video is a good summary of the Observer pattern chapter in the book Head First Design Patterns book.
  • VIDEO

    Redux: A use case for the observer pattern
    If you work in the world of React, you have probably dealt with Redux to manage the state of your application.

  • Redux is an implementation of the observer pattern.
  • This method “pushes” new subscribers to the array

    const subscribe = (listener) = (
        listeners.push(listener)
    );

    Remember that subscribe is called in the componentDidMount method which fires immediately after the component mounts.

Continue reading “The Observer Pattern In Javascript”

Introducing Rapscallion

Rapscallion - a SUPER fast approach for server-side rendering React applications #reactjs

  • We’re excited to see what comes of that effort, but in the interim, there is a lot of value in addressing the issue of SSR performance with the React of today.
  • And so, I’m happy to announce the initial release of Rapscallion, a new approach for server-side rendering React applications.
  • The simplest way to use Rapscallion is through its Promise interface:

    This might be preferable in some cases, especially if you’re not dealing with an actual server environment, but if you’re using Express or Hapi, you’ll probably be more interested in the stream interface:

    There are a couple of reasons why this might be preferable to rendering to a Promise.

  • During previous discussions about possibilities for async SSR, it had been noted that attaches a attribute to the root DOM node of your component.
  • By default, Rapscallion caches content in memory, but an API is also provided to wire up any external caching service you might prefer, like Redis, memcached or ElastiCache.

Rapscallion is a new approach for server-side rendering React applications
Continue reading “Introducing Rapscallion”

Five reasons why web developers love React Native

ReactNative offers a cross-platform framework for the future.  #reactnative

  • Overall, React Native has over 40K stars on GitHub and over 9K forks .
  • With React Native, you aren’t building true native mobile apps; you’re building apps for all platforms.
  • The technology is still pretty new, but there are some excellent React Native apps right now .
  • As you probably guessed from the name itself, React Native lets you build native applications.
  • According to stateofjs.com , 78% of developers are interested in learning about the new kid on the block: React Native.

What makes React Native so special? More and more web developers are getting into the app-building ecosystem using React Native.
Continue reading “Five reasons why web developers love React Native”

New Tutorial Series: Building a Web-Application using React and Redux – Zsolt Nagy

New Tutorial Series: Building a Web-Application using React and Redux   #ReactJS #Redux

  • React is very popular, very powerful, and has a great ecosystem.
  • It is a JavaScript framework to build Single Page Applications.
  • I have updated the text sticking to the opinion that ng1 should not be considered when starting a new project, even if it does not mirror real life.
  • It is possible to use React as a part of an MVC framework, and React applications can also be built on their own.
  • Home > React + Redux > New Tutorial Series: Building a Web-Application using React and Redux

The goal of this series is to give you a fully up to date view on how to create a web application, sticking to the highest standards, and using the latest technologies that are both widely supported and stable.
Continue reading “New Tutorial Series: Building a Web-Application using React and Redux – Zsolt Nagy”

Why GraphQL is the future — Building Apollo — Medium

Why GraphQL is the future – and what it means for you:  #ReactJS

  • Where REST has only an ad-hoc approach, GraphQL has a clean layer of abstraction
  • Companies turn to GraphQL because they realize that REST can’t help them solve these problems, but GraphQL can.
  • Using Facebook means using GraphQL.
  • Their REST API has gotten so complicated that it’s a significant drag on product development.
  • Facebook has been using GraphQL since 2012 – well before it was open-sourced in July of last year.

Read the full article, click here.


@ReactiveConf: “Why GraphQL is the future – and what it means for you: #ReactJS”


And what it means for you


Why GraphQL is the future — Building Apollo — Medium