mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 06:32:11 +00:00
callback dependencies
This commit is contained in:
parent
c35394289c
commit
2b83812327
1 changed files with 2 additions and 2 deletions
|
|
@ -11,14 +11,14 @@ storiesOf('ModalDialog', module).add('ModalDialog', () => {
|
|||
const oneButton = [
|
||||
{
|
||||
label: 'Show many buttons', icon: 'ic_ellipsis', props: {
|
||||
onClick: React.useCallback(()=>setButtons(manyButtons))
|
||||
onClick: React.useCallback(()=>setButtons(manyButtons), [])
|
||||
}
|
||||
},
|
||||
]
|
||||
const manyButtons = [
|
||||
{
|
||||
label: 'One', icon: 'ic_back_ios', props: {
|
||||
onClick: React.useCallback(()=>setButtons(oneButton))
|
||||
onClick: React.useCallback(()=>setButtons(oneButton), [])
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue