September 2017
Intermediate to advanced
120 pages
2h 47m
English
A lot of existing front-end code manipulates DOM nodes directly. It might cost too much time and effort to rewrite this code in React, but by wrapping this code in a React component, you can combine it with other React components without having to rewrite all the UI logic.
As an example, we’re going to build a React wrapper for the Pikaday date picker (https://github.com/dbushell/Pikaday) as shown in the figure.

React date pickers exist already, but the same techniques we’ll use to integrate Pikaday will let you wrap any code that accesses the DOM, so you can recycle any of your more exotic widgets.
Create a new directory ...
Read now
Unlock full access