Commit Graph

5327 Commits

Author SHA1 Message Date
dan
fc644cd244 Revert "Sandpack error icon overlapping issue fix (#4302)" (#4325)
This reverts commit cd1717bfbd.
2022-02-12 00:25:07 +00:00
uulaal
f20da4c840 removed old "early time for hooks" note (#4321) 2022-02-11 22:18:33 +00:00
dan
b8b26e5be1 Simplify wording 2022-02-10 01:59:54 +00:00
Kid
c7d5aacd80 Fix broken MDN E4X links (#4316) 2022-02-09 12:22:28 +00:00
Xuan Huang (黄玄)
03f232346e [Beta] Use "Parameters" as titles? (#4314)
Taking examples of [MDN](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask) or [Swift](https://developer.apple.com/documentation/swift/1541053-print), the name used in signatures (assuming this name will be used by type defs like in TS and [Flow](https://github.com/facebook/flow/blob/main/lib/react.js#L343)) is probably more often called as "Parameters". 

I don't have a strong opinion on this since the distinction are minor and often confusing, but it looks a bit unfamiliar to me as titles. I think use "arguments" interchangeably in other part of writing is fine otherwise it's too much of a mental burden.
2022-02-09 02:48:48 +00:00
Strek
d7dfc5d203 Fix typo (#4311) 2022-02-08 08:41:02 +05:30
Sophie Alpert
edac1430f2 [beta] Tweak usestate.md (#4310)
Hopefully people know you can do things other than render it but most of our examples have it in the JSX directly, so it might help to be explicit.
2022-02-08 00:23:23 +00:00
Aayush Kumar
cfa3670fa2 small fixes to stopwatch codesandbox (#4110)
* small fixes to stopwatch codesandbox

noticed that the explanation for the first stopwatch codesandbox mentions "update the time every 10 milliseconds" so updated the codesandbox to reflect that

also there's a small nuanced bug in the second stopwatch codesandbox where each call to `handleStart()` sets a new interval without checking if there's already one ongoing. 

Ie: If the user accidentally double clicks the start button, they set two intervals for updating `now` every 10ms and then intervalRef only retains the second interval ID. Thus, it's impossible to actually stop the timer because `handleStop()` will only clear the latest set interval while the original one will keep executing.

* Update referencing-values-with-refs.md

* Update referencing-values-with-refs.md

* Update referencing-values-with-refs.md

Co-authored-by: dan <dan.abramov@gmail.com>
2022-02-07 21:40:23 +00:00
Soichiro Miki
4be33b8128 Change "return statement" to "return keyword" (#4137) 2022-02-07 21:33:11 +00:00
Sofya Tuymedova
466809e8f4 docs: fix a grammatical error (#4183)
Co-authored-by: dan <dan.abramov@gmail.com>
2022-02-07 21:30:31 +00:00
Sofya Tuymedova
cb6e1d0807 docs: phrasing a sentence (#4182)
* docs: phrasing a sentence

* Update extracting-state-logic-into-a-reducer.md

Co-authored-by: dan <dan.abramov@gmail.com>
2022-02-07 21:29:29 +00:00
Sofya Tuymedova
c089fbc7cd docs: phrasing a sentence (#4185) 2022-02-07 21:25:53 +00:00
dan
7d615adec3 [Beta] useState Troubleshooting (#4309)
* [Beta] useState Troubleshooting

* Tweaks

* tweak
2022-02-07 20:50:48 +00:00
Strek
71b743a2a6 Generate Ids when there are none in local development (#4304)
* Generate Ids when there are no headings

* Tweak code

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2022-02-07 19:08:41 +00:00
Sha Mwe La
e2b2ebfd7b Improve font display (#4308) 2022-02-07 18:02:08 +00:00
Amaresh S M
cd1717bfbd Sandpack error icon overlapping issue fix (#4302)
* sandpack error icon overlapping issue fix

* modified errorline css
2022-02-07 17:23:26 +05:30
Sahil Mhapsekar
20f0fe280f Update React India 2022 Conference Dates 🌴 (#4305) 2022-02-06 22:42:17 +05:30
Abrahym Sharf Eldden
55b4754073 Updated code-splitting.md (#4303)
Updated the imported `react-router-dom` Component `BrowserRouter` to read as `BrowserRouter as Router` since the code example has it as `Router` instead of `BrowserRouter`

Alternatively, can change the `<Router></Router>` component to be `<BrowserRouter>...</BrowserRouter>`
2022-02-06 12:56:58 +05:30
Dan Abramov
ea824c610d More tweaks 2022-02-05 14:59:07 +00:00
Sophie Alpert
a4796b7a38 [beta] Don't call it "derived state" (#4301)
I propose that "storing information from previous renders" sounds less like a _cool thing_ and also more clearly describes the rare cases this pattern is for.
2022-02-05 14:35:51 +00:00
Humberto
b86f35d87a docs: fix typo in useState Adjusting derived state section (#4300) 2022-02-05 11:00:37 +05:30
Sophie Alpert
5d2a4e369a [beta] Push people away more from setting state in render (#4299)
* [beta] Push people away more from setting state in render

* Backticks
2022-02-04 23:16:37 +00:00
Dan Abramov
6ebae122a4 Rm unused 2022-02-04 21:12:50 +00:00
Dan Abramov
77af71e359 tweak 2022-02-04 21:12:13 +00:00
Dan Abramov
b06f63219c Clarify 2022-02-04 21:08:37 +00:00
Dan Abramov
12ca0d4327 Mention loops 2022-02-04 20:49:41 +00:00
Dan Abramov
b174aec9a9 Tweak 2022-02-04 20:46:36 +00:00
dan
881e0a0933 [Beta] Document derived state (#4297)
* [Beta] Document derived state

* shorten
2022-02-04 20:33:51 +00:00
Strek
1e79ed6890 Removes readme and contributing.md from generate heading lint (#4295)
* Removes readme and contributing.md from generate heading

* lint only markdowns in source
2022-02-04 18:38:21 +00:00
dan
73d7d13446 [Beta] Move /reference -> /apis (#4294)
* [Beta] Move /reference -> /apis

* come on

* Update CONTRIBUTING.md

* Update sidebarReference.json
2022-02-04 17:42:27 +00:00
lxmarinkovic
caffe3d08f React-Meetup-Stockholm (#4292) 2022-02-04 22:55:19 +05:30
lxmarinkovic
fd585005fe React-Global-2022 (#4291)
* React-Global-2022

* Update content/community/conferences.md

* react-global-edit

Co-authored-by: Strek <ssharishkumar@gmail.com>
2022-02-04 17:26:08 +05:30
Danilo Woznica
4d005ad7e0 fix(sandpack): disable init-mode (#4278) 2022-02-04 16:33:35 +05:30
Danilo Woznica
52393daffe fix(useMediaQuery): adds fallback to matchMedia (#4289) 2022-02-04 16:31:44 +05:30
dan
001b1f021b [Beta] useState API: Best of the both words? Haha just kidding... Unless?... (#4284)
* Dry version

* Here we go again

* Recreation lol

* Some tweaks (#4285)

* tweaks

* edit

Co-authored-by: Sophie Alpert <git@sophiebits.com>
2022-02-04 05:37:56 +00:00
John Wade Linatoc
eb0ae240c3 Update courses.md (#4282)
Current Tyler McGinnis link no longer works. Updated it to the homepage instead.
2022-02-04 00:37:42 +05:30
Jerson Zúñiga-Coayla
5479670315 fix: typo (#4279) 2022-02-03 16:12:43 +05:30
dan
e6b843bb84 [Beta] Change useState structure, add examples (#4276)
* [Beta] Change useState structure, add examples

* Simpler language

* Nix when not to use it
2022-02-03 00:29:33 +00:00
dan
84742f0b0b Fix typo 2022-02-02 15:19:32 +00:00
dan
75db8f2c36 [Beta] Rename TaskBoard -> TaskApp in examples (#4271)
* [Beta] Rename TaskBoard -> TaskApp in examples

* Update another page

* Update another page

* Update another page

* Update another page
2022-02-02 15:18:52 +00:00
dan
42576e0e08 Bump workflow versions (#4270)
* Bump workflow versions

* Update beta_site_lint.yml

* Update nodejs.yml
2022-02-02 11:58:20 +00:00
Danilo Woznica
626f957364 fix(sandpack): improve memory usage (#4126)
* fix(sandpack): init mode

* init mode tweaks

* sandpack preview: keep loading state while preview is still working

* prettify it

* fix: renew client listener on remount
2022-02-02 11:44:26 +00:00
Dan Abramov
c8ad67d379 Fix deps 2022-02-01 13:53:34 +00:00
Dan Abramov
7d1e054fb0 Remove unused patch 2022-02-01 13:24:53 +00:00
dan
abca1f4495 Use MDXContext directly (#4267)
* Use MDXContext directly

* yolo
2022-02-01 13:19:17 +00:00
dan
58d6f3f9fc Prevent nav context re-renders (#4266) 2022-02-01 12:51:14 +00:00
dan
17e91d83fe [Beta] Address Quick Start review nits (#4264)
* Address review nits

* Update beta/src/pages/learn/index.md

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

* Update beta/src/pages/learn/index.md

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

* edits

* edits

* edit

Co-authored-by: Ricky <rickhanlonii@gmail.com>
2022-02-01 00:30:26 +00:00
dan
38057903ec [Beta] Reorder useState page (#4265) 2022-01-31 23:41:30 +00:00
Brennon Bortz
5f0549c86e chore: fix typo (#4255)
Fix typo in quick start
2022-01-30 13:02:56 +05:30
dan
9ff30d6a58 Revert "Revert "Removed circle CI (#4236)" (#4253)" (#4254)
This reverts commit 4e20db714b.
2022-01-28 21:21:46 +00:00