Loading tutorials
import and export in TypeScript or modern JavaScript, and you have worked in a small or medium React app. The chapter compares the two most common ways to lay out folders. It then gives criteria for choosing betwe5 min readimport and export. It also assumes you have seen the feature-based layout from the previous chapter, where each feature has its own folder. Here you will decide what to call files and folders, and where each file si5 min readimport and export. It also assumes you have worked in a small or medium React app built with Vite or webpack. Earlier chapters compared organizing by file type with organizing by feature. Here you build a fea6 min read@/ alias that works in the compiler, the bundler, the test runner, and ESLin5 min readimport, export) and basic TypeScript. It also assumes you have already grouped code by feature, as in the earlier chapters on feature modules. Here you will decide which parts of a feature other co6 min readsrc/features/<name> with an index.ts public API, plus src/app and src/shared. It also assumes you are comfortable with React props, composition with children, and React Router. Here you will split components5 min readuse and that calls other hooks. This chapter assumes you know useState, useEffect, and props, and that you have read the earlier chapters on feature modules and component layers. Here you will learn when to pull logic out of a component, where5 min readfetch with promises. It also assumes you have read the earlier chapters on feature modules and public APIs. The examples use TanStack Query v5 (@tanstack/react-query). Other server-state libraries such as SWR or RTK Query follow t5 min readshared/ui layer: what belongs in it, how to design its components, and when it grows into a design system.6 min readindex.ts public API are, and that you have set up a path alias such as @/. You should be able to read an ESLint configuration file.6 min readindex.ts public API, a shared/ folder, and the @/ path alias. It also assumes you have written tests with Vitest or Jest and React Testing Library. The examples use Vitest, but the placement r4 min readindex.ts as its public API.5 min readgit mv, edit tsconfig.json, and read a pull request diff. The goal is to move a working flat React project to a feature-based layout witho5 min read