Commit Graph

60 Commits

Author SHA1 Message Date
Dan Abramov
5ef6955a90 Simplify wording 2023-01-24 07:27:10 +00:00
dan
3b0be4fbef Link to beta in content (#5495) 2023-01-24 07:03:08 +00:00
Sean Moriarity
47e444a4e9 Increase clarity of Context documentation (#3527) 2021-02-16 12:04:40 +01:00
Sam Bigelow
21fe4c829b Fix a grammatical error in Context.md (#3352) 2020-10-26 16:40:37 +01:00
Chris Wilson
ec07e80be0 Remove prev/next links from the Advanced Guide (#3269) 2020-09-21 10:19:11 +02:00
Eduard Poracký
d16f1ee795 Add next and previous links to Advanced Guides (#540)
Co-authored-by: Eduard Poracký <eporacky@trionyx.sk>
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
2020-08-23 19:44:57 +02:00
jarstelfox
f90d199a61 Memo: Document behavior with useContext (#2332)
* Memo: Document behavior with useContext

It is not obvious that useContext and Memo work well together. Namely, if a child component listens to a context and updates out from under them memo'd function, does the memo'd component have the right state if re-rendered?

yes, actually. but this is undocumented. Now it's not!

* fix typo tigger -> trigger

* Add more detail to all relevant pages

Co-authored-by: Alex Krolick <alexkrolick@users.noreply.github.com>
Co-authored-by: Sophie Alpert <git@sophiebits.com>
2019-12-31 13:51:08 -08:00
Michael Lustig
9705d2796b Fix error (#2370) 2019-09-26 11:06:42 -07:00
Mojtaba Izadmehr
5cdb85b5e5 Add doc for context displayaName (#2367)
* Add doc for context displayaName

* Add highlight for js doc

* Fix context display name link

* Fix context displayName comment
2019-09-24 11:54:26 -07:00
Gasim Gasimzada
8e805d7995 Add missing avatarSize in "Before you use context" to text and code (#1737) 2019-02-27 14:40:09 -08:00
Nat Alison
25df15b83e reapply, correctly generating links 2019-02-06 18:03:29 -08:00
Nat Alison
dc1e5366e3 revert id adding 2019-02-06 18:00:52 -08:00
Nat Alison
3e49e971d0 add everything else again 2019-02-06 17:22:04 -08:00
rthurgood
13959877d3 Update context.md (#1420) 2018-11-21 18:09:17 +00:00
Sebastian Markbåge
896214b7d2 Document class contextType as the primary consuming mechanism (#1283)
* Document class contextType as the primary consuming mechanism

* Update context.md
2018-10-23 16:48:02 -07:00
Sophie Alpert
21511bde38 Tweaks to "Before You Use Context" (#1091)
![screenshot of new section](https://user-images.githubusercontent.com/6820/43227544-d9d55496-9013-11e8-8fe3-b16ed96d0070.png)
2018-08-03 13:21:02 +01:00
Dan Abramov
023fb45343 Tweaks 2018-07-25 03:13:43 +02:00
Dan Abramov
7016c4a21d Tweak 2018-07-25 02:31:36 +02:00
Dan Abramov
5028f0874d Add "Before You Use Context" (#1085) 2018-07-25 02:17:15 +02:00
Dan Burzo
1d5217a293 Clarify change propagation in Context API (#896) 2018-05-21 14:01:22 +01:00
Alex Krolick
c95de8b59a Clarify defaultValue usage (#868)
Fixes #867
2018-05-07 23:48:13 -07:00
Michael Li
ed255e604b Fix grammar 2018-04-22 00:37:19 -04:00
tjallingt
6521a654cb Added updating nested context default value example (#780)
* added context default value example

* Implement suggested change

* noop function as default value to createContext
2018-04-09 11:12:02 -07:00
tjallingt
e4941f6440 Added example for updating nested context consumer (#776)
* Added an example showing how to update the context from inside a (deeply) nested component

* Wrap comments

* Wrap comments

* Tweak wording

* Prettier

* Prettier

* Typo: "funtion" -> "function"
2018-04-06 18:49:55 -07:00
Dan Abramov
1466232fbf Tweak context 2018-04-06 16:19:11 +01:00
Alex Krolick
6c22a4345b Clarify when Consumers get the default value (#770)
* Clarify when Consumers get the default value

* Change wording
2018-04-06 15:14:46 +01:00
Asher Michael
c1c9714041 Update context.md (#751)
Corrected a grammar error in one of the notes section.
2018-04-01 13:34:24 +01:00
Alex Krolick
e8646074ee Absolute link 2018-03-29 18:23:11 -07:00
Brian Vaughn
3a36a402a5 Revert "Added inline child function caveat to Context docs"
This reverts commit 691cd4577c.
2018-03-29 09:24:43 -07:00
Brian Vaughn
691cd4577c Added inline child function caveat to Context docs 2018-03-29 09:15:30 -07:00
Brian Vaughn
bd06bbc1a7 Added context HOC example to reference 2018-03-24 09:30:27 -07:00
Alex Krolick
349446d8a7 Add caveats section 2018-03-23 13:51:07 -07:00
Alex Krolick
c9d50e3aba Remove lib link 2018-03-23 11:49:31 -07:00
Alex Krolick
9e4442a5ad typo 2018-03-23 11:28:16 -07:00
Alex Krolick
fe84e096dc Explain why you need forwardRef 2018-03-23 11:25:41 -07:00
Alex Krolick
509b126510 Explain context in lifecycle a bit more 2018-03-23 11:23:22 -07:00
Alex Krolick
e6898245d9 Add notes about composing multiple contexts 2018-03-23 11:13:25 -07:00
Alex Krolick
d58c892169 + "same algo" 2018-03-23 11:07:53 -07:00
Alex Krolick
1ead0605c2 17 -> future version 2018-03-23 11:04:29 -07:00
Brian Vaughn
b25276a80e Updated forward-refs example to use class component 2018-03-23 09:23:04 -07:00
Brian Vaughn
f5d51393f5 Formatted a Note 2018-03-23 09:08:05 -07:00
Alex Krolick
f588bd61e1 Update "legacy" wording 2018-03-22 22:38:37 -07:00
Alex Krolick
4e1282edac Add to "when to use context" 2018-03-22 22:36:16 -07:00
Alex Krolick
6eb29a18f5 Combine basic examples 2018-03-22 22:22:36 -07:00
Alex Krolick
da091e6723 Add note about how changes are determined 2018-03-22 22:16:08 -07:00
Alex Krolick
7b5764fed5 Add ref forwarding, lifecycle examples 2018-03-22 21:15:40 -07:00
Alex Krolick
fec6d6c141 Add mutliple contexts example 2018-03-22 21:01:59 -07:00
Alex Krolick
53d604fd3a ~deprecated~ legacy 2018-03-22 20:58:50 -07:00
Alex Krolick
e9ae68f55b remove confusing {} 2018-03-22 20:58:22 -07:00
Alex Krolick
6aa199516d Add solution to motivation problem 2018-03-21 10:04:11 -07:00