# extendify/0.10.2/src/Onboarding/hooks/useDisableWelcomeGuide.js

Extendify, version 0.10.2. 15 lines.

- Page: https://pluginprobe.com/plugins/extendify/0.10.2/code/src/Onboarding/hooks/useDisableWelcomeGuide.js
- Raw: https://pluginprobe.com/plugins/extendify/0.10.2/raw/src/Onboarding/hooks/useDisableWelcomeGuide.js
- Modified: 2022-05-27T00:51:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/0.10.2/code/src/Onboarding/hooks/useDisableWelcomeGuide.js#L10-L20`.

```javascript
import { useSelect, dispatch } from '@wordpress/data'
import { useEffect } from '@wordpress/element'

export const useDisableWelcomeGuide = () => {
    const isWelcomeGuide = useSelect((select) => {
        return select('core/edit-post').isFeatureActive('welcomeGuide')
    }, [])

    useEffect(() => {
        if (isWelcomeGuide) {
            dispatch('core/edit-post').toggleFeature('welcomeGuide')
        }
    }, [isWelcomeGuide])
}

```
