Function useAppState

  • Preact hook that import current state to the component.

    Should always be at the top of the component!

    See also: useAppStateSelector

    Returns State

    import { useAppState } from '@nosto/preact'

    export default () => {
    const { query } = useAppState()

    return <div>
    Searching for {query.query}
    </div>
    }

    Use useAppStateSelector instead.