When I used hooks in my sidebar why it is giving me that error
Error: Invalid hook call. Hooks can only be called inside of the body of a function component
my code
import React, { useState, createRef, useEffect, useRef } from 'react';
import { View, Text, Alert, StyleSheet } from 'react-native';
import {
DrawerContentScrollView,
DrawerItemList,
DrawerItem,
} from '@react-navigation/drawer';
const CustomSidebarMenu = (props) => {
const [userimage, setuserimage] = useState('');
return (
);
};
export default CustomSidebarMenu;