Patrones de renderizado y composición
Por qué debes aprender React Avanzado
Cómo implementar Render Props y Composition en React
Cómo implementar Control Props en React
Cómo implementar el Patrón Compound en React
Qué son los High-Order Components en React
Cómo utilizar Custom Hooks en React
Cómo implementar el Patrón Container-Presenter en React
React: Diferencias entre componentes controlados y no controlados
Navegación con React Router
Qué es Single Page Application y Server Side Rendering en React
Enrutamiento dinámico y navegación programática en React
Optimización con Rutas Anidadas y Lazy Loading en React
Rutas Protegidas, Redirecciones y Manejo de Errores
Manejo del estado en React
React Context y Patrón Provider
React Context y Custom Hooks
useReducer: Store
useReducer: Actions y Reducers
useReducer: Componente Todo List
Redux Toolkit: Store y Actions
Redux Toolkit: Reducer
Redux Toolkit: Componente Todo List
Zustand: Configuración del Store
Zustand: Componente Todo List
State Machines
State Machines: configuración
State Machines: componente Wizard
State Machines: XState Visualizer
Comunicación con servidor y data fetching
Qué es TanStack Query
Code Splitting y Manejo de Errores
Paginación con Concurrent Mode y useTransition
Memoización y Lazy Loading con Suspense
Sigue avanzando con tus conocimientos de React
Nunca pares de aprender React
You don't have access to this class
Keep learning! Join and start boosting your career
Understanding the difference between Single Page Application (SPA) and Server Side Rendering (SSR) is key to building modern websites and improving the user experience. In this guide, we explore their features and set up a basic React project with routing to implement these concepts in a practical environment.
To create an SPA in React, let's set up routing with React Router DOM and organize the basic routes.
Initialize the project:
npm create vite@latest my-react-routers-app.
Select React with TypeScript as the base framework.
Install dependencies:
Once inside the project folder, run:
npm install npm install react-router-dom
Configure basic routing:
main.tsx
file, wrap your application in BrowserRouter
.Home
and About
, and define routes for them.Add navigation links:
Use React Router's Link
component to connect the Home
and About
routes.
App.tsx
import { BrowserRouter, Routes, Route, Link } from 'react-router-dom';import Home from './components/Home';import About from './components/About';function App(){ return ( <Route path="/" element={ } /> <Route path="/about" element={ } /> ); } export default App;
:npm run dev
Access localhost
and navigate between the configured routes to verify operation.Contributions 5
Questions 0
Want to see more contributions, questions and answers from the community?