React Gantt - XState Tutorial
This tutorial will guide you through creating a React TypeScript application with Vite, integrating DHTMLX React Gantt component, and managing state with XState.
Prerequisites
- Basic knowledge of React, TypeScript, Vite, and XState
- Recommended: read Basics to understand the data binding mode and the
data.savecallback this tutorial builds on.
Quick setup - create the project
Before you start, install Node.js.
Create a Vite React + TypeScript project:
npm create vite@latest react-gantt-xstate-demo -- --template react-ts
cd react-gantt-xstate-demo
Now let's install the required dependencies.
- For npm:
npm install xstate @xstate/react @mui/material @mui/icons-material @emotion/react @emotion/styled
- For yarn:
yarn add xstate @xstate/react @mui/material @mui/icons-material @emotion/react @emotion/styled
Then we need to install the React Gantt package.