diff --git a/.github/workflows/analyze_comment.yml b/.github/workflows/analyze_comment.yml index 1e086b9b7..fcac37738 100644 --- a/.github/workflows/analyze_comment.yml +++ b/.github/workflows/analyze_comment.yml @@ -6,8 +6,11 @@ on: types: - completed -permissions: {} - +permissions: + contents: read + issues: write + pull-requests: write + jobs: comment: runs-on: ubuntu-latest diff --git a/public/fonts/Source-Code-Pro-Bold.woff2 b/public/fonts/Source-Code-Pro-Bold.woff2 new file mode 100644 index 000000000..220bd5d96 Binary files /dev/null and b/public/fonts/Source-Code-Pro-Bold.woff2 differ diff --git a/public/fonts/Source-Code-Pro-Regular.woff2 b/public/fonts/Source-Code-Pro-Regular.woff2 index 655cd9e81..fd665c465 100644 Binary files a/public/fonts/Source-Code-Pro-Regular.woff2 and b/public/fonts/Source-Code-Pro-Regular.woff2 differ diff --git a/public/images/blog/react-labs-april-2025/flip.gif b/public/images/blog/react-labs-april-2025/flip.gif deleted file mode 100644 index a7363ebf6..000000000 Binary files a/public/images/blog/react-labs-april-2025/flip.gif and /dev/null differ diff --git a/src/components/Layout/HomeContent.js b/src/components/Layout/HomeContent.js index 600e37c74..2e7182bcc 100644 --- a/src/components/Layout/HomeContent.js +++ b/src/components/Layout/HomeContent.js @@ -875,7 +875,8 @@ function ExampleLayout({
+ className="relative mt-0 lg:-my-20 w-full p-2.5 xs:p-5 lg:p-10 flex grow justify-center" + dir="ltr"> {right}
} right={ - + - + } /> ); diff --git a/src/components/Layout/Page.tsx b/src/components/Layout/Page.tsx index ec3a6eba0..c3224e517 100644 --- a/src/components/Layout/Page.tsx +++ b/src/components/Layout/Page.tsx @@ -82,11 +82,9 @@ export function Page({ 'max-w-7xl mx-auto', section === 'blog' && 'lg:flex lg:flex-col lg:items-center' )}> - - - {children} - - + + {children} +
{!isBlogIndex && (
- + logo by @sawaratsuki1004 )); return ( - +
{sequential ? (
    @@ -373,7 +373,7 @@ function IllustrationBlock({ )}
-
+ ); } diff --git a/src/components/MDX/Sandpack/template.ts b/src/components/MDX/Sandpack/template.ts index 7fbd537e7..dd6fd12bd 100644 --- a/src/components/MDX/Sandpack/template.ts +++ b/src/components/MDX/Sandpack/template.ts @@ -1,7 +1,7 @@ export const template = { '/src/index.js': { hidden: true, - code: `import React, { StrictMode } from "react"; + code: `import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import "./styles.css"; diff --git a/src/components/PageHeading.tsx b/src/components/PageHeading.tsx index 409bd03b8..3f15afe95 100644 --- a/src/components/PageHeading.tsx +++ b/src/components/PageHeading.tsx @@ -27,7 +27,6 @@ function PageHeading({ tags = [], breadcrumbs, }: PageHeadingProps) { - console.log('version', version); return (
diff --git a/src/components/Seo.tsx b/src/components/Seo.tsx index 628085744..b8a8394b6 100644 --- a/src/components/Seo.tsx +++ b/src/components/Seo.tsx @@ -124,7 +124,14 @@ export const Seo = withRouter( )} + -`refs` passed to classes are not passed as props since they reference the component instance. +`ref`s passed to classes are not passed as props since they reference the component instance. diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md index a2bcd196e..a97f3d5b4 100644 --- a/src/content/community/conferences.md +++ b/src/content/community/conferences.md @@ -45,6 +45,11 @@ September 2-4, 2025. Wrocław, Poland. [Website](https://www.reactuniverseconf.com/) - [Twitter](https://twitter.com/react_native_eu) - [LinkedIn](https://www.linkedin.com/events/reactuniverseconf7163919537074118657/) +### React Alicante 2025 {/*react-alicante-2025*/} +October 2-4, 2025. Alicante, Spain. + +[Website](https://reactalicante.es/) - [Twitter](https://x.com/ReactAlicante) - [Bluesky](https://bsky.app/profile/reactalicante.es) - [YouTube](https://www.youtube.com/channel/UCaSdUaITU1Cz6PvC97A7e0w) + ### React Conf 2025 {/*react-conf-2025*/} October 7-8, 2025. Henderson, Nevada, USA and free livestream diff --git a/src/content/community/index.md b/src/content/community/index.md index a22e50e13..fd91d057e 100644 --- a/src/content/community/index.md +++ b/src/content/community/index.md @@ -29,4 +29,8 @@ Cada comunidad está constituida por miles de usuarios de React. ## Noticias {/*news*/} +<<<<<<< HEAD Para conocer las últimas noticias sobre React, [sigue **@reactjs** en Twitter](https://twitter.com/reactjs) y el [blog oficial de React](/blog/) en este sitio web. +======= +For the latest news about React, [follow **@reactjs** on Twitter](https://twitter.com/reactjs), [**@react.dev** on Bluesky](https://bsky.app/profile/react.dev) and the [official React blog](/blog/) on this website. +>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91 diff --git a/src/content/community/meetups.md b/src/content/community/meetups.md index f6b0c27a6..4a4431ceb 100644 --- a/src/content/community/meetups.md +++ b/src/content/community/meetups.md @@ -38,7 +38,7 @@ title: Reuniones de React ## Canadá {/*canada*/} * [Halifax, NS](https://www.meetup.com/Halifax-ReactJS-Meetup/) -* [Montreal, QC - React Native](https://www.meetup.com/fr-FR/React-Native-MTL/) +* [Montreal, QC](https://guild.host/react-montreal/) * [Vancouver, BC](https://www.meetup.com/ReactJS-Vancouver-Meetup/) * [Ottawa, ON](https://www.meetup.com/Ottawa-ReactJS-Meetup/) * [Saskatoon, SK](https://www.meetup.com/saskatoon-react-meetup/) @@ -88,6 +88,7 @@ title: Reuniones de React * [Delhi NCR](https://www.meetup.com/React-Delhi-NCR/) * [Mumbai](https://reactmumbai.dev) * [Pune](https://www.meetup.com/ReactJS-and-Friends/) +* [Rajasthan](https://reactrajasthan.com) ## Indonesia {/*indonesia*/} * [Indonesia](https://www.meetup.com/reactindonesia/) diff --git a/src/content/learn/build-a-react-app-from-scratch.md b/src/content/learn/build-a-react-app-from-scratch.md index 9e319796c..7c6715369 100644 --- a/src/content/learn/build-a-react-app-from-scratch.md +++ b/src/content/learn/build-a-react-app-from-scratch.md @@ -115,10 +115,17 @@ De manera similar, si confías en que las aplicaciones usen tu framework para di La división del código por rutas, cuando se integra con el empaquetamiento y la obtención de datos, puede reducir el tiempo de carga inicial de su aplicación y el tiempo que tarda en renderizarse el contenido visible más grande de la aplicación. ([Largest Contentful Paint](https://web.dev/articles/lcp?hl=es-419)). +<<<<<<< HEAD Para obtener instrucciones sobre cómo dividir el código, consulte la documentación de su herramienta de compilación: - [Optimizaciones de compilación](https://es.vite.dev/guide/features.html#optimizaciones-de-compilacion) - [División de código con Parcel](https://parceljs.org/features/code-splitting/) - [División de código con Rsbuild](https://rsbuild.dev/guide/optimization/code-splitting) +======= +For code-splitting instructions, see your build tool docs: +- [Vite build optimizations](https://vite.dev/guide/features.html#build-optimizations) +- [Parcel code splitting](https://parceljs.org/features/code-splitting/) +- [Rsbuild code splitting](https://rsbuild.dev/guide/optimization/code-splitting) +>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91 ### Mejorar el rendimiento de las aplicaciones {/*improving-application-performance*/} diff --git a/src/content/learn/keeping-components-pure.md b/src/content/learn/keeping-components-pure.md index 8c6d2fd61..4d768ef8a 100644 --- a/src/content/learn/keeping-components-pure.md +++ b/src/content/learn/keeping-components-pure.md @@ -175,7 +175,7 @@ function Cup({ guest }) { } export default function TeaGathering() { - let cups = []; + const cups = []; for (let i = 1; i <= 12; i++) { cups.push(); } @@ -245,7 +245,7 @@ Renderizar es un *cálculo*, no debería tratar de "hacer" cosas. ¿Puedes expre ```js src/Clock.js active export default function Clock({ time }) { - let hours = time.getHours(); + const hours = time.getHours(); if (hours >= 0 && hours <= 6) { document.getElementById('time').className = 'night'; } else { @@ -307,7 +307,7 @@ Puedes arreglar este componente calculando el `className` e incluirlo en la sali ```js src/Clock.js active export default function Clock({ time }) { - let hours = time.getHours(); + const hours = time.getHours(); let className; if (hours >= 0 && hours <= 6) { className = 'night'; @@ -606,14 +606,20 @@ export default function StoryTray({ stories }) { import { useState, useEffect } from 'react'; import StoryTray from './StoryTray.js'; +<<<<<<< HEAD let initialStories = [ {id: 0, label: "Historia de Ankit" }, {id: 1, label: "Historia de Taylor" }, +======= +const initialStories = [ + {id: 0, label: "Ankit's Story" }, + {id: 1, label: "Taylor's Story" }, +>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91 ]; export default function App() { - let [stories, setStories] = useState([...initialStories]) - let time = useTime(); + const [stories, setStories] = useState([...initialStories]) + const time = useTime(); // PISTA: Evita que la memoria crezca por siempre mientras lees documentos. // Estamos rompiendo nuestras propias reglas aquí. @@ -702,14 +708,20 @@ export default function StoryTray({ stories }) { import { useState, useEffect } from 'react'; import StoryTray from './StoryTray.js'; +<<<<<<< HEAD let initialStories = [ {id: 0, label: "Historia de Ankit" }, {id: 1, label: "Historia de Taylor" }, +======= +const initialStories = [ + {id: 0, label: "Ankit's Story" }, + {id: 1, label: "Taylor's Story" }, +>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91 ]; export default function App() { - let [stories, setStories] = useState([...initialStories]) - let time = useTime(); + const [stories, setStories] = useState([...initialStories]) + const time = useTime(); // PISTA: Evita que la memoria crezca por siempre mientras lees documentos. // Estamos rompiendo nuestras propias reglas aquí. @@ -769,8 +781,13 @@ Como alternativa, podrías crear un _nuevo_ array (copiando el existente) antes ```js src/StoryTray.js active export default function StoryTray({ stories }) { +<<<<<<< HEAD // ¡Copia el array! let storiesToDisplay = stories.slice(); +======= + // Copy the array! + const storiesToDisplay = stories.slice(); +>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91 // Esto no afecta al array original: storiesToDisplay.push({ @@ -794,14 +811,20 @@ export default function StoryTray({ stories }) { import { useState, useEffect } from 'react'; import StoryTray from './StoryTray.js'; +<<<<<<< HEAD let initialStories = [ {id: 0, label: "Historia de Ankit" }, {id: 1, label: "Historia de Taylor" }, +======= +const initialStories = [ + {id: 0, label: "Ankit's Story" }, + {id: 1, label: "Taylor's Story" }, +>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91 ]; export default function App() { - let [stories, setStories] = useState([...initialStories]) - let time = useTime(); + const [stories, setStories] = useState([...initialStories]) + const time = useTime(); // PISTA: Evita que la memoria crezca por siempre mientras lees documentos. // Estamos rompiendo nuestras propias reglas aquí. diff --git a/src/content/learn/managing-state.md b/src/content/learn/managing-state.md index b11a07d55..b9689e43f 100644 --- a/src/content/learn/managing-state.md +++ b/src/content/learn/managing-state.md @@ -741,9 +741,9 @@ export default function Section({ children }) { const level = useContext(LevelContext); return (
- + {children} - +
); } @@ -836,13 +836,11 @@ export function TasksProvider({ children }) { ); return ( - - + + {children} - - + + ); } diff --git a/src/content/learn/preserving-and-resetting-state.md b/src/content/learn/preserving-and-resetting-state.md index 16000f269..8e34d9892 100644 --- a/src/content/learn/preserving-and-resetting-state.md +++ b/src/content/learn/preserving-and-resetting-state.md @@ -672,7 +672,11 @@ label { +<<<<<<< HEAD El estado del contador se reinicia cuando se hace clic en la casilla de verificación. Aunque se renderiza un `Counter`, el primer hijo del `div` cambia de `div` a `section`. Cuando el `div` hijo se eliminó del DOM, todo el árbol debajo de él (incluyendo el `Counter` y su estado) se destruyó también. +======= +The counter state gets reset when you click the checkbox. Although you render a `Counter`, the first child of the `div` changes from a `section` to a `div`. When the child `section` was removed from the DOM, the whole tree below it (including the `Counter` and its state) was destroyed as well. +>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91 @@ -2011,7 +2015,7 @@ export default function ContactList() {