![]() You need to have some React understanding. Remove them if you want to use npm to install dependencies. You can use npm if you want.Īll the examples for this chapter contain yarn.lock files. In this chapter's examples, I will use Yarn. ![]() You also need to know how to use node package managers. You can use nvm on Mac or Linux to switch Node versions. Make sure you have Node 10.16.0 or later. I recommend using VSCode, which supports TypeScript out of the box. You will need a code editor with TypeScript support. If you are more experienced you can use Windows Subsystem for Linux. On Windows I recommend using Cygwin or Cmder. All Linux distributions also have some preinstalled terminal applications. On Mac, you can use Terminal.app, available by default. There are a bunch of requirements before you start working with this chapter.įirst of all, you need to know how to use the command line. In our application we will recreate only the core functionality: creating tasks, making lists and dragging them around. You can also add comments and attach files to your tasks. You can drag both cards and lists to reorder them. In Trello, you can create tasks and organize them into lists. A popular example of such an application is Trello. We will create a simplified version of a kanban board. So we will discuss how to use fetch with TypeScript. Our application will also store the state on the backend. Some of them are compatible by default, and some require you to install special packages. We'll talk about using JavaScript libraries in your TypeScript project. We will mostly work with functional components, because this is the most popular approach right now. We'll briefly discuss the difference between types and interfaces. You'll see how to use TypeScript to specify the props. I will show you the file structure it generates and then I'll explain the purpose of each file there. If you haven't heard about it yet - no worries, I will talk about it in more detail further in this chapter. If you've worked with React before, you might be familiar with it. We will bootstrap the file structure using the create-react-app CLI. In this part of the book, we will create our first React + TypeScript application.
0 Comments
Leave a Reply. |