ammarahm-ed / react-native-actions-sheet

A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
https://rnas.vercel.app
MIT License
1.49k stars 121 forks source link

useRouter is being returned as undefined function #303

Closed dwrynngs closed 8 months ago

dwrynngs commented 1 year ago

When I follow the example for using routes, I get an error on the following line

const router = useRouter();

error says "undefined is not a function".

I import it as follows:

import ActionSheet, { useSheetRouteParams, useScrollHandlers, useRouter } from 'react-native-actions-sheet';

I honestly don't know what I am doing wrong. The only difference is I am writing in javascript, not in typescript.

frouple commented 1 year ago

I'm also facing this issue in javascript

luckyxhu commented 1 year ago

use useSheetRouter instead.