Commit Graph

6245 Commits

Author SHA1 Message Date
Matt Carroll
742d2bff8f Add use hook API reference page (#6177)
* [WIP] Add use hook API reference page

* [WIP] Update use hook API reference page based on feedback

* [WIP] use hook API ref doc: add browser API example

* [WIP] use hook API ref doc: add context, lib examples

* [WIP] use reference doc - incorporate all current feedback

* [WIP] use reference page fix typos

* use reference doc: address PR feedback from Luna, Sophia,Eli, and Lee

* Apply @harish-sethuraman's typo fixes from code review

Co-authored-by: Strek <ssharishkumar@gmail.com>

* use reference doc typo fixes

* use reference doc: update style to match other react.dev conventions

* minor fixes

* Remove client Promises, use canary labels

* Add use hook section to index, remove RSC section on components page

* Final edits

* Clarify use reference caveats

---------

Co-authored-by: Strek <ssharishkumar@gmail.com>
2023-09-08 10:33:16 -07:00
Drew Nollsch
46e7b2c687 Fixes error in cloneElement code example (#6291) 2023-09-08 17:01:17 +01:00
Sophie Alpert
20ccdf9291 Update lazy.md to mention default exports (#6285)
React.lazy dots into the `default` property. Document this.
2023-09-07 11:38:21 -07:00
ramadevsign
ee98f75cf1 add rendercon kenya 2023 to conferences (#6133) 2023-09-06 14:12:29 -07:00
Aleksandar15
9e144cdd5a Fix typo in preserving-and-resetting-state.md (#6194) 2023-09-06 14:07:02 -07:00
Luna
7141306c90 Add cache API docs (#6240)
Co-authored-by: Ricky <rickhanlonii@gmail.com>
Co-authored-by: Luna Wei <luwe@fb.com>
Co-authored-by: Ricky Hanlon <rickhanlonii@gmail.com>
2023-09-06 10:50:03 -07:00
Minu Kim
df9d90764a Fix flushSync.md grammar (#6282) 2023-09-06 01:48:30 -07:00
Néstor Guillermo Hernández
14629a7e19 Fix incorrect link in select.md (#6227)
Fix incorrect link in select.md
2023-09-05 14:39:45 -07:00
Max Jacobson
230c39bd91 Fix link in new typescript docs (#6232)
While reading the new typescript docs introduced in #6120, I noticed this link points to a fork. This commit changes it to a relative link so it should work everywhere.
2023-09-05 13:35:49 -07:00
Rohit Sekh
cd09ffbc35 Update Twitter(X) icon for light and dark mode (#6235)
Update Twitter(X) icon for light and dark mode
2023-09-05 11:25:56 -07:00
Justin E. Samuels
05380da53e Update conferences.md (#6256)
Added RenderATL 2024 to the conferences Markdown page
2023-09-05 09:15:13 -07:00
Saksham Gupta
be6c39d8b7 Update tutorial-tic-tac-toe.md (#6259)
Grammar fix
2023-09-05 09:14:53 -07:00
Monica Powell
9b4c56a210 update conferences to move React Rally 23 to previous and add upcoming conferences (#6246)
* update conferences to move react rally to previous and add reactjs day

* Add React Alicante

* Update conferences.md

* Update conferences.md to include year of the event

* add anchor link

* Update conferences.md

* Update conferences.md

* chore: update country name

---------

Co-authored-by: Strek <ssharishkumar@gmail.com>
2023-09-05 14:20:45 +01:00
Yogesh Surendran
722b54640e fix(docs): remove inactive indian meetup groups (#6267) 2023-08-30 14:11:39 +05:30
Eli White
3189529259 Add React Native EU 2023 to the conferences page (#6254)
React attends this conference hosted by Callstack. It's been on the page in previous years, missed it this year.

https://www.react-native.eu/
2023-08-23 14:53:20 -07:00
Luna
f67811befe Clarify these features are not related to Next (#6229)
Co-authored-by: Luna Wei <luwe@fb.com>
2023-08-21 13:34:53 -07:00
Thomas Charuel
842c24c9ae Fix broken link for Typescript Discord invite (#6224) 2023-08-16 19:17:59 -07:00
Ahmed Abdelbaset
6b61cd490d Annex to #6138 (#6226)
* fix: wronge styles when applying RTL 

it was `top-0 left-0 ...` by wrong I made it `inset-x-0`.

* fix wrong styles

* fix wrong styles

* style canary icon with RTL-friendly styles

* chore: utilize mx-* instead of me-* & ms-*

* utilize relative styles

* chore: use mx-* instead of me-* & ms-*

* style canary icon with RTL-frindly styles

* Update OpenInTypeScriptPlayground.tsx
2023-08-15 18:24:46 -04:00
Ahmed Abdelbaset
819518cfe3 RTL Languages Support (#6138)
* Update TailwindCSS & Install rtl-detect
1- Update TailwindCSS to use the logical properities such as `ps-1` instead of `pl-1`.
there are logical properities for margin, padding, inset, and text direction.

2- Install `rtl-detect` detect if the language is RTL direction.
Note: this might be uninstalled if we use the manual way to specify rtl language.

* add `siteConfig.isRTL`

* add `dir` attribute to the root element

* edit some tw classes to utilize logical properties
instead of directions properties
(e.g. `pr-0` to `pe-0`)

* edit some tw classes to utilize logical properties
instead of directions properties
(e.g. `pr-0` to `pe-0`)

* edit some tw classes to utilize logical properties
instead of directions properties
(e.g. `pr-0` to `pe-0`)

* edit some tw classes to utilize logical properties
instead of directions properties
(e.g. `pr-0` to `pe-0`)

* Refactor TW classes: Use logical properties over directional properties.

* Revert "Refactor TW classes: Use logical properties over directional properties."

This reverts commit df9620d944.

* Refactor TW classes: Use logical properties over directional properties.

* Refactor TW classes: Use logical properties over directional properties.

* Refactor TW classes: Use logical properties over directional properties.

* Add `start` and `end` directions to the `IconNavArrow`

* Add Note about `isRTL` prop

* Refactor TW classes: Use logical properties over directional properties.

* Refactor TW classes: Use logical properties over directional properties.

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* set dir attr of `CodeBlock` to `ltr` even the page dir is `rtl`

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* Add `start` and `end` directions to some icons

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* set dir attr of `ConsoleBlock` to `ltr` to overwrite the dir of root element

* Refactor TW classes: use logical properties over directional properties

* set dir=ltr on inline code blocks to overwrite <html dir="rtl"> in some languages

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* set translate=no, dir=ltr on `TerminalBlock` to overwrite <html dir="rtl"> in rtl languages

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* Refactor TW classes: use logical properties over directional properties

* fix some direction styles

* fix arrow directions in rtl

* remove `rtl-detect` and set `siteConfig.isRTL` manually

* fix `Breadcrumbs`'s arrow direction in rtl languages

* fix some directions of the search modal for RTL languages

* hard setting dir=ltr to Sandpack to overwrite rtl languages dir

* Refactor TW classes: use logical properties over directional properties

* remove my notes

* fix: rerverse space-x-* in rtl

* rebase with the main branch

* remove unnecessary alt

* add `start` & `end` display directions to the Chevron Icon

* rebase with the main branch
2023-08-11 15:42:12 -04:00
Umair Raza
79560d6572 fix: remove Hong Kong from choosing-the-state-structure (#5957)
* fix: remove Hong Kong from choosing-the-state-structure

closes Improper examples #5955

* change boolean style for rendering
2023-08-11 00:14:24 -04:00
Hannanel Gershinsky
2bfa54411e removing reference to create-react-app (#6012) 2023-08-10 23:48:07 -04:00
Bruno Eduardo de Souza Medeiros
b1a5b7b0b0 fix(docs): Component reference render parameters (#6098) 2023-08-10 23:14:34 -04:00
Ricky
a86663da84 Fix IntersectionObserver examples (#6212) 2023-08-10 23:10:18 -04:00
Diwakar Kashyap
02c0067101 remove Bad grammar in react.dev tictactoe documentation (#6126)
* change docs

* add docs for create react app

* remove

* Update src/content/learn/tutorial-tic-tac-toe.md

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
2023-08-10 21:37:34 -04:00
Néstor Guillermo Hernández
22d98782b9 Update correct link common.md (#6125) 2023-08-10 15:29:00 -07:00
Ricky
ae06008d57 Add UI for canary releases (#6173)
* [WIP] Add UI for canary releases

* yellow

* Switch to icon and gray

* Wording, alignment, and rm flex

* Heading alignment
2023-08-10 17:10:58 -04:00
Natsuo Kawai
fcc639b062 Fix IDs specified in the MDN page URLs (#6176) 2023-08-10 16:49:36 -04:00
Ricky
03c2e965c3 Fix recipe titles (#6209) 2023-08-09 22:46:03 -04:00
Ricky
c60bcac830 Fix TerminalBlock overflow (#6208) 2023-08-09 21:53:23 -04:00
Orta Therox
f82f392287 Adds a TypeScript overview page (#6120)
* Start of the typescript page

* Intro

* Intro

* Use State

* Use Reducer

* Start of context

* Use Ref

* Events

* Wrap up 1st draft

* Better titles

* Apply suggestions from code review

Co-authored-by: Tom Sherman <the.tomsherman@gmail.com>
Co-authored-by: Lenz Weber-Tronic <mail@lenzw.de>

* Note types/react and types/react-dom, and tone down the usecontext null check

* Feedback

* Given a 2nd run through of the doc

* Apply suggestions from code review

Co-authored-by: Ricky <rickhanlonii@gmail.com>

* Document where `State` is coming from

* Link what inferred types are

* Remove "knock-on"

We already say "cause" which makes "knock-on" a bit redundant

* Move useRef TS usage to useRef reference page

dropped useEffect since there's nothing specific about this hook.

* Add installation section

* Link to framework specific guides

* Edits

* Edit footer

* Rm useRef docs

---------

Co-authored-by: Tom Sherman <the.tomsherman@gmail.com>
Co-authored-by: Lenz Weber-Tronic <mail@lenzw.de>
Co-authored-by: Ricky <rickhanlonii@gmail.com>
Co-authored-by: Sebastian Silbermann <sebastian.silbermann@klarna.com>
2023-08-09 12:10:31 -04:00
TimLi
cd13b52ec1 Fix homepage title (#5838)
* Fix homepage title

Fixed homepage title bug, now the homepage will display the title from `content/index.md` instead of the constant `React`.

* Update index.md

Change title to "React" to keep same
2023-08-07 15:51:55 -04:00
Matan Borenkraout
a472775b7c docs: fix a broken link in react-labs-june-2022 (#6149) 2023-07-25 10:35:34 -04:00
Ahmed Abdelbaset
19c0fe2dcc fix componentdidcatch (#6107) 2023-07-24 21:29:02 -04:00
Hyejun Lee
505f6510a3 Fix root-unmount returns (#6137) 2023-07-24 21:14:44 -04:00
Jiman Jeong
b452e7b613 docs: separate dot from hyperlink (#6140) 2023-07-24 21:11:36 -04:00
Afonso Jorge Ramos
39b9692cd5 Update conferences timeline (#6159) 2023-07-24 21:03:40 -04:00
Soichiro Miki
6ebe2dd76d Fix "onFocus" description (#6168)
The "onFocus" is fired when an element receives focus, not loses.
2023-07-24 21:00:15 -04:00
Soichiro Miki
a132d8f355 Remove junk lines in common.md (#6167) 2023-07-24 20:59:14 -04:00
Soichiro Miki
cf4ad1999a Fix typo: "server-only" to "client-only" (#6164) 2023-07-24 20:57:55 -04:00
Ricky
d86cfc4763 Update useInsertionEffect docs (#6172) 2023-07-24 10:05:08 -04:00
Ricky
b9eea4da28 Fix lint warnings (#6174) 2023-07-21 19:24:36 -04:00
Brandon Dail
a30e1f954d update link to fault tolerance blog post (#6142)
this is the canonical link now 🫡
2023-07-10 13:56:39 +05:30
Sophie Alpert
292534e975 Add basic reference pages for use client and server (#5976)
* Add basic reference pages for use client and server

I guess this turned into a bit more of an FAQ but I think it's useful to have this written down in a canonical place.

* Oops, push final tweaks
2023-06-30 11:59:55 -07:00
yuta-ike
f5ffb3f0fb fix: broken link (#6115) 2023-06-26 11:25:19 +05:30
Christophe Porteneuve
9a1e1c61fc Fix incorrect inner component reference (#6044)
The inner component is `EditForm`, not `EditContact`.
2023-06-09 13:18:21 +05:30
Cole Milne
940e963798 Move recent conferences from 'Upcoming' to 'Past' section (#6089) 2023-06-08 23:29:56 +05:30
Ahmed Abdelbaset
8313857315 Fix(github-actions): Update gh-actions dependencies to versions that utilize Node.js v16 (#6084)
* Update site_lint.yml

* Update site_lint.yml
2023-06-05 13:36:56 +01:00
Ahmed Abdelbaset
ca93140eb9 Fix option's mdn link (#6080) 2023-06-02 17:12:16 +05:30
J
4184c0f560 Fix a missing word in useLayoutEffect (#6078) 2023-05-31 15:15:21 +01:00
Serhii Palamarchuk
ad4f5c7c95 Update NextJs link (#6053) 2023-05-30 17:57:57 +01:00