Skip to content

Commit

Permalink
separate function/class ref example
Browse files Browse the repository at this point in the history
  • Loading branch information
renrizzolo committed Nov 18, 2020
1 parent f50ea42 commit 068ce82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Examples of commonly requested functions/patterns. Required props/functions ommi

Some of these examples use a ref to the component like this:

Function component:

```JS
// function component
import React, { useRef } from 'react'

const App = () => {
Expand All @@ -23,8 +24,11 @@ const ref = useRef(null)
</>
)
}
```
// class component
Class component:
```JS
<>
<SectionedMultiSelect
...
Expand Down

0 comments on commit 068ce82

Please sign in to comment.