Commit Graph

136 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
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
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
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
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
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
Strek
e1dcbffde1 bump next to latest (#4251) 2022-01-28 19:15:35 +00:00
Strek
3564e690b8 Introduce lint staged (#4240)
* Commit lint staging

* Add mdx parser for prettier

* fix css

* Fixed lint staged for md

* Fixed markdowns

* Revert prettifying markdown since build fails

* Removed css command and included with tsx

* replace with older readme and contibuting
2022-01-28 18:56:11 +00:00
dan
1c355ab630 [Beta] Change "You will learn" for chapters (#4239) 2022-01-28 18:55:27 +00:00
dan
b22c3d6865 [Beta] Rewrite Quick Start (#4245)
* [Beta] Rewrite Quick Start

* Tweaks
2022-01-28 03:01:32 +00:00
Dan Abramov
2b2ac5c3bf Fix download label 2022-01-28 00:42:59 +00:00
dan
4451e5b0b3 Make line highlight full width (#4246) 2022-01-28 00:42:14 +00:00
Ben Rogers-McKee
53d279e370 fix: challenges navigation (#4123)
* fix: challenges navigation

* fix: challenges navigation alternate solution

* fix: challenges navigation assert non null on find

* refactor: unnecessary default value
2022-01-27 21:06:51 +00:00
Mark R. Florkowski
ec65cc000c Add "click to copy" to TerminalBlock (#4025)
* add click to copy to TerminalBlock

* rebase + changes

* fix 'Not all code paths return a value.'

* fix svg jsx

* fix lint errors
2022-01-27 21:06:39 +00:00