From 43966be41c30f24b42081a5d2893ec28535b5f30 Mon Sep 17 00:00:00 2001 From: Gabs Date: Sat, 25 May 2024 16:25:44 -0300 Subject: [PATCH 1/4] feat: add translation of useInsertionEffect into pt-br --- .../reference/react/useInsertionEffect.md | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/content/reference/react/useInsertionEffect.md b/src/content/reference/react/useInsertionEffect.md index 0238facf7..f9976a5fb 100644 --- a/src/content/reference/react/useInsertionEffect.md +++ b/src/content/reference/react/useInsertionEffect.md @@ -4,13 +4,12 @@ title: useInsertionEffect -`useInsertionEffect` is for CSS-in-JS library authors. Unless you are working on a CSS-in-JS library and need a place to inject the styles, you probably want [`useEffect`](/reference/react/useEffect) or [`useLayoutEffect`](/reference/react/useLayoutEffect) instead. - +`useInsertionEffect` é destinado a autores de bibliotecas CSS-em-JS. A menos que você esteja desenvolvendo em uma biblioteca CSS-em-JS e precise injetar os estilos, você provavelmente vai utilizar [`useEffect`](/reference/react/useEffect) ou [`useLayoutEffect`](/reference/react/useLayoutEffect). -`useInsertionEffect` allows inserting elements into the DOM before any layout effects fire. +O `useInsertionEffect` permite inserir elementos no DOM antes que qualquer efeito de layout seja acionado. ```js useInsertionEffect(setup, dependencies?) @@ -22,81 +21,82 @@ useInsertionEffect(setup, dependencies?) --- -## Reference {/*reference*/} +## Referência {/*reference*/} ### `useInsertionEffect(setup, dependencies?)` {/*useinsertioneffect*/} -Call `useInsertionEffect` to insert styles before any effects fire that may need to read layout: +Chame `useInsertionEffect` para inserir estilos antes de qualquer efeito que precise ler o layout: ```js import { useInsertionEffect } from 'react'; -// Inside your CSS-in-JS library +// Na sua biblioteca CSS-em-JS function useCSS(rule) { useInsertionEffect(() => { - // ... inject