1 option
React Application Architecture for Production : A Hands-On Guide to Architecting, Building, and Delivering Enterprise-ready Modern React Apps.
- Format:
- Book
- Author/Creator:
- Alickovic, Alan.
- Language:
- English
- Subjects (All):
- REAC (Computer).
- Software architecture.
- Physical Description:
- 1 online resource (380 pages)
- Edition:
- 1st ed.
- Place of Publication:
- Birmingham : Packt Publishing, Limited, 2026.
- Summary:
- Master modern React application architecture patterns and principles for building scalable, maintainable production apps and learn best practices in project structure, component design, state management, testing strategies, and more.
- Contents:
- Cover
- React Application Architecture for Production
- A hands-on guide to architecting, building, and delivering enterprise-ready modern React apps
- Contributors
- About the authors
- About the reviewers
- Table of Contents
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Get the code bundle
- Conventions used
- Get in touch
- Free benefits with your book
- How to unlock
- Share your thoughts
- 1
- Understanding the Architecture of React Applications
- Why architecture matters
- Architecture as foundation
- Coordination and velocity
- Speed through clarity
- Economics of good architecture
- Architecture and product quality
- The React architecture challenge
- How do we structure the project?
- How do we render our application?
- How do we manage state?
- How do we style components?
- How do we handle data fetching?
- How do we handle authentication?
- How do we test a React application?
- The meta-decision
- Thinking about architectural decisions
- Patterns that usually don't work
- Patterns that usually work
- Planning our application
- Functional requirements: What it does
- Non-functional requirements: How it works
- The data model
- Architectural decisions
- Project structure: feature-based
- Rendering strategy: hybrid
- State management: Multi-tier
- Styling: Tailwind CSS + BaseUI
- Authentication: Cookie-based
- Testing: pragmatic
- Summary
- Get this book's PDF copy, code bundle, and more
- 2
- Setup and Project Structure Overview
- Technical requirements
- Choosing a meta framework for the project
- What is a meta framework, and why do we need it?
- The pain points they solve
- The React meta framework landscape
- Next.js.
- React Router (in framework mode)
- TanStack Start
- Making the right choice
- Why we're using React Router
- How to get started with React Router
- Build tool setup overview
- What is Vite, and why do we need it?
- How Vite works with React Router
- Our Vite configuration
- Type-checking setup overview
- What is TypeScript, and why do we need it?
- How TypeScript works
- Our TypeScript configuration
- React Router type generation
- Running TypeScript checks
- Linting setup overview
- What is linting, and why do we need it?
- ESLint overview
- Our ESLint configuration
- Running ESLint
- Formatting setup overview
- What is code formatting, and why do we need it?
- How Prettier works
- Configuring Prettier
- Pre-commit checks setup overview
- What are pre-commit hooks, and why do we need them?
- How pre-commit hooks work
- Our pre-commit workflow
- Running pre-commit checks
- Project structure overview
- What is project structure, and why does it matter?
- Different approaches to project structure
- File type structure
- Feature-based structure
- Why we chose the feature-based structure
- How the code flows
- Application (top-level)
- Features (mid level)
- Shared utilities (bottom-level)
- Why this matters
- Enforcing project structure with ESLint
- Constraint 1: Shared utilities must remain independent
- Constraint 2: Features cannot import from the app
- Constraint 3: Feature dependencies are explicit and controlled
- ESLint in action
- Environment variables setup overview
- What are environment variables, and why do we need them?
- Our environment variable system
- Setting up environment variables
- 3
- Building and Documenting Components
- Anatomy of a component
- What is a component?.
- Using the component
- Creating our component library
- What is a component library, and why do we need one?
- Different approaches to component libraries
- Option 1: Install a package (Material-UI, Ant Design, Chakra UI, Mantine)
- Pros:
- Cons:
- Option 2: Build from scratch
- Option 3: Shadcn UI (copy-paste components)
- Why we chose Shadcn UI
- Configuring Shadcn UI
- Using the CLI
- Adding components
- Creating components manually
- Documenting components
- Creating a component route
- What is storybook?
- Configuring Storybook
- Configuring Vite for storybook
- Configuring Storybook preview
- Running Storybook
- Documenting components with Storybook
- Creating a story file
- Meta configuration
- ArgTypes configuration
- Individual stories
- Viewing stories in Storybook
- 4
- Routing and Rendering Strategies
- Routing with React Router
- Configuring routes in React Router
- Navigating between pages
- Using Link for basic navigation
- Using NavLink for navigation with active states
- Using useNavigate for programmatic navigation
- Rendering strategies
- Server-side rendering
- Creating a server-rendered idea detail page
- Client-side rendering
- Creating a client-rendered dashboard page
- Hybrid rendering
- Creating a hybrid profile page
- Static pre-rendering
- Creating pre-rendered home and about pages
- Adding meta tags to pages
- Adding page layouts
- 5
- Communicating with the API
- Creating API client
- Generating TypeScript types and validation schemas from OpenAPI specifications
- What is OpenAPI and why generate types?
- Configuring type generation
- Setting up React Query.
- Why React Query?
- Configuring React Query for the application
- Creating API layer for the application
- Organizing query keys
- Defining queries
- Defining mutations
- Integrating with the application
- Queries
- Client-side usage
- Server-side usage
- Server-side usage via HydrationBoundary
- Mutations
- Get this book's PDF version and more
- 6
- Managing Application State
- Managing local state
- Sharing state globally
- Handling asynchronous state
- Managing form state
- Persisting state in the URL
- 7
- Implementing Authentication and Securing the Application
- Authentication
- Extending the API client
- Registration page
- Login page
- Logging out the user
- Accessing the user in the app
- Protecting routes
- Authorization
- Securing the application
- Content sanitization
- Security headers
- 8
- Improving Application Performance
- Detecting performance issues
- Optimizing components
- Colocating state
- Memoizing expensive calculations
- Using component composition
- Code splitting and lazy loading
- Streaming content from the server
- Debouncing user input
- Large data set optimization
- Pagination
- List virtualization
- Optimistic updates
- 9
- Going International
- Understanding internationalization architecture
- Where to store translations
- How our i18n system works
- Language detection and storage
- Server-side rendering with translations
- Client-side hydration
- Loading translations dynamically
- Switching languages
- Setting up i18n in our application
- Organizing translations with namespaces.
- App-level translations
- Feature-scoped translations
- Combining translations
- Configuring React-i18next
- Creating the i18next middleware
- Initializing on the server
- Initializing on the client
- Serving translations via API
- Adding type safety to translation keys
- Using translations in the application
- Using the default namespace
- Interpolation
- Pluralization
- Formatting dates
- Switching between languages in the application
- The language switcher component
- The API endpoint
- 10
- Making the Application Accessible
- Understanding accessibility fundamentals
- Accessibility principles
- Laying the architectural foundation
- Semantic HTML
- Defining page landmarks
- Using accessible component libraries
- Practical accessibility optimizations
- Skip links for keyboard navigation
- Providing accessible labels
- Announcing dynamic changes
- 11
- Testing the Application
- Why testing is important
- Unit testing
- Integration testing
- End-to-end testing
- 12
- Going to Production
- What is CI/CD?
- Using GitHub Actions
- Workflows
- Events
- Jobs
- Steps
- Actions
- Runners
- Configuring the pipeline for continuous integration
- Configuring the pipeline for continuous deployment
- Creating the deployment workflow
- Setting up Render
- Getting the service ID and API key
- Adding secrets to the repository
- Verifying the deployment
- 13
- Evolving the Application
- Using AI to enforce application architecture
- Understanding the right mental model
- Context files.
- Writing rules that work.
- Notes:
- Description based on publisher supplied metadata and other sources.
- Part of the metadata in this record was created by AI, based on the text of the resource.
- ISBN:
- 1-83620-296-2
- OCLC:
- 1591759966
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.