react-hooks/exhaustive-deps fixes
parent
1f16c75121
commit
68e1abf4a9
|
@ -48,20 +48,17 @@ export const ComposePost = observer(function ComposePost({
|
||||||
|
|
||||||
const autocompleteView = useMemo<UserAutocompleteViewModel>(
|
const autocompleteView = useMemo<UserAutocompleteViewModel>(
|
||||||
() => new UserAutocompleteViewModel(store),
|
() => new UserAutocompleteViewModel(store),
|
||||||
[],
|
[store],
|
||||||
)
|
)
|
||||||
const localPhotos = useMemo<UserLocalPhotosModel>(
|
const localPhotos = useMemo<UserLocalPhotosModel>(
|
||||||
() => new UserLocalPhotosModel(store),
|
() => new UserLocalPhotosModel(store),
|
||||||
[],
|
[store],
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
autocompleteView.setup()
|
autocompleteView.setup()
|
||||||
})
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
localPhotos.setup()
|
localPhotos.setup()
|
||||||
}, [localPhotos])
|
}, [autocompleteView, localPhotos])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// HACK
|
// HACK
|
||||||
|
@ -78,7 +75,7 @@ export const ComposePost = observer(function ComposePost({
|
||||||
clearTimeout(to)
|
clearTimeout(to)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [textInput.current])
|
}, [])
|
||||||
|
|
||||||
const onChangeText = (newText: string) => {
|
const onChangeText = (newText: string) => {
|
||||||
setText(newText)
|
setText(newText)
|
||||||
|
|
Loading…
Reference in New Issue