Skip to content

Commit 4ce5e5a

Browse files
no more old context api
1 parent c07517b commit 4ce5e5a

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

docs/Details.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,3 @@ Worth mentioning, `for..await` also can be used for producing content over time.
4242
for await (const event of stream)
4343
yield <EventInfo event={event} />;
4444
}
45-
46-
## Using context
47-
48-
React Context is [accessible](https://facebook.github.io/react/docs/context.html#referencing-context-in-stateless-functional-components) in the same way as for stateless functional components:
49-
50-
async function* SomeCoroutine(props, context) {
51-
for await (const message of context.dispatcher)
52-
yield <SomeContent message={message} {...props} >;
53-
}
54-
55-
SomeCoroutine.contextTypes = {
56-
dispatcher: () => null
57-
};

0 commit comments

Comments
 (0)