Skip to content

Instantly share code, notes, and snippets.

@rtymchyk
Last active August 28, 2019 22:43
Show Gist options
  • Select an option

  • Save rtymchyk/c84acf16b30baaf086dc221ba2a378d0 to your computer and use it in GitHub Desktop.

Select an option

Save rtymchyk/c84acf16b30baaf086dc221ba2a378d0 to your computer and use it in GitHub Desktop.

Revisions

  1. rtymchyk revised this gist Aug 28, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion context-consumer-hook.MD
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    ```javascript
    import { useContext } from 'react'

    import { SnackBarContext } from 'client/snack-bar-provider'
    import { SnackBarContext } from 'components/snack-bar-provider'

    const useSnackBars = () => useContext(SnackBarContext)

  2. rtymchyk created this gist Aug 28, 2019.
    9 changes: 9 additions & 0 deletions context-consumer-hook.MD
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    ```javascript
    import { useContext } from 'react'

    import { SnackBarContext } from 'client/snack-bar-provider'

    const useSnackBars = () => useContext(SnackBarContext)

    export default useSnackBars
    ```