Advertisement

Building a React-Like Library

  • Anto Aravinth
  • Srikanth Machiraju
Chapter

Abstract

So far, we have learned to write functional JavaScript code and to appreciate the modularity, reusability, and simplicity it brings to your applications. We have seen concepts like composition, filters, map, reduce, and other features such as async, await, and pipes. Nonetheless, we have not combined these features together to build a reusable library. That is something we are going to learn in this chapter. In this chapter we build a complete library that will be helpful in building applications, just like React or HyperApp ( https://hyperapp.js.org ). This chapter is dedicated towards building applications instead of just functions. We will build two HTML applications using functional JavaScript programming concepts we have learned so far. We will learn how to build an application with central storage, render a user interface (UI) using declarative syntax, and wire up events using our custom library. We are going to build a tiny JavaScript library that will be capable of rendering HTML applications with behavior. In the next chapter we will learn to write unit tests for the library we build in this chapter.

Copyright information

© Anto Aravinth, Srikanth Machiraju 2018

Authors and Affiliations

  • Anto Aravinth
    • 1
  • Srikanth Machiraju
    • 2
  1. 1.ChennaiIndia
  2. 2.HyderabadIndia

Personalised recommendations