Hooks

Open drawer handler

const { drawerRef } = userDrawer()
const openDrawer = () => {
    return drawerRef.current?.openDrawer()
}

Close drawer handler

const { drawerRef } = userDrawer()
const closeDrawer = () => {
    return drawerRef.current?.closeDrawer()
}

Params

const params = useParams()
const Home = (props: ScreenProps) => {
    const params = props?.params;
    console.log(params)
    const router = useRouter()
    return (
        <View>
            <Text>
                Home
            </Text>
            <Link href="/settings/435345?search=5435&query=45435&done=true#done" >
                Settings
            </Link>
            <Button
                title='Settings'
                onPress={() => {
                    router.push('/settings/435345?search=5435&query=45435&done=true#done')
                }}
            />
        </View>
    )
}
{
    blogID: 53455,
    title: "Title"
}
PropertyDetails
keyKeys of type string.
valuesValues of type string or number.

Router properties

const router = useRouter()
console.log(router)
navigate a link
const Home = (props: ScreenProps) => {
    const params = props?.params
    const router = useRouter()
    return (
        <View>
            <Text>
                Home
            </Text>
            <Link href="/settings/435345?search=5435&query=45435&done=true#done" >
                Settings
            </Link>
            <Button
                title='Settings'
                onPress={() => {
                    router.push('/settings/435345?search=5435&query=45435&done=true#done')
                }}
            />
        </View>
    )
}

Searchparams

const router = useRouter()
const searchparams = router?.query

with query: https://example.com/path?name=Branch&product=5345

PropertyDetails
keyKeys of type string.
valuesValues of type string or number.

Note: Avoid using slashes at the end of link/url

Bad/not working: /settings/435345/?search=5435&query=45435&done=true#done Use: /settings/435345?search=5435&query=45435&done=true#done

PropertyDescription
pathA string or null representing the path.
basePathA string representing the base path.
hashA string or null representing the hash.
protocolA string or null representing the protocol.
asPathA string representing the asPath.
originA string or null representing the origin.
usernameA string or null representing the username.
passwordA string or null representing the password.
hostnameA string or null representing the hostname.
portA string or null representing the port.
queryAn object with keys as strings and values of any type.
pushA function for navigating with options, returning a promise.
historyAn object with methods for navigating history and retrieving history stack.
titleCurrent screen title

Navigation Provider

const navigation = useNavigation();

Navigation properties:

PropertyDetails
loadingComponentIndicates whether a loading component is displayed.
setLoadingComponentFunction to set the loading component state.
customDynamicNavbarCustom dynamic navigation bar component.
setCustomDynamicNavbarFunction to set the custom dynamic navbar component.

ThemeAdd translator