Create a To Do App with React, Recoil and TypeScript

Create a To Do App with React, Recoil and TypeScript

Create a To Do App with React, Recoil and TypeScript. We will be using create-react-app. First, a little about Recoil is a state management library developed by Facebook. Here is where all the Todo App will be created.

First, a little about Recoil

Recoil is a state management library developed by Facebook, initially used by Facebook itself, but now made open source. According to its official website,  recoiljs.org, these are its 3 distinct features:

  1. Minimal and Reactish: Use a flexible, shared React-like state.
  2. Data-flow graph: “Derived data and asynchronous queries are tamed with pure functions and efficient subscriptions.”
  3. Cross-App observation: “Implement persistence, routing, time-travel debugging, or undo by observing all state changes across your app, without impairing code-splitting.”

You can take a look at its documentation  here.

Show me some code!

Let’s start building the application. We will be using create-react-app. If you already have the node module installed, run this in your terminal:

create-react-app todo-with-recoil --template typescript

Or, in case you want it in your own project directory, run:

create-react-app . --template typescript

If you don’t, use npx:

npx create-react-app todo-with-recoil --template typescript

If we have no errors, we are good to go. First, we must remove all unnecessary files and folders. The selected files should be deleted (don’t forget to remove their imports too!):

Files to delete (optional)

programming javascript typescript react

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How native is React Native? | React Native vs Native App Development

Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.

React cloneElement: A Better Way to Build a Component API Props in ES6 Javascript and Ts

Using the React cloneElement is a better way to build a component API props in ES6 Javascript and Typescript. Here's a tutorial on how to do so.

React With Typescript, Redux And Thunk - React Javascript Tutorial

Wanted to make a video with redux and redux-thunk using typescript. I found this a bit confusing when I first learned it and hopefully this videos makes the ...

React With Typescript Crash Course - How To Use React With Typescript

I show how to use React with Typescript: - How to define a component How to specify props using types and interfaces - How to define state - How to handle events

A Quick Intro to TypeScript for JavaScript Programmers

If you are a newer JavaScript developer like me you may have come across the superset of JavaScript known as TypeScript. TypeScript is an open-source extension of JavaScript that changes JavaScript from a functional programming language into an object-oriented programming language.