Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Modify to add Context API examples to README_SOURCe
  • Loading branch information
sosukesuzuki committed Jan 26, 2019
commit 5f7e10d09936d4bc42d69b02bd38711537a67136
24 changes: 24 additions & 0 deletions README_SOURCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,30 @@ const mapDispatchToProps = (dispatch: Dispatch<ActionType>) => ({

[⇧ back to top](#table-of-contents)

## Context API

> https://reactjs.org/docs/context.html

#### ThemeContext

::codeblock='playground/src/context/theme-context.ts'::

[⇧ back to top](#table-of-contents)

#### ThemeProvider

::codeblock='playground/src/context/theme-provider.tsx'::

[⇧ back to top](#table-of-contents)

#### ThemeConsumer

::codeblock='playground/src/context/theme-consumer.tsx'::

[Implementation with Hooks](#hooks)

[⇧ back to top](#table-of-contents)

## Hooks

> https://reactjs.org/docs/hooks-intro.html
Expand Down