skip to Main Content

React beginner. My NavBar gives error of "Uncaught TypeError: Cannot read properties of null (reading 'addEventListener') i cant seem to tell why." – Reactjs

I try to create and use an animated hamburger menu icon instead of already made icons for my Navbar component `const menu = document.querySelector('.menu_button'); const showMenu = document.querySelector('.mobile-nav'); let menuOpen = false; console.log(menu); menu.addEventListener('click', () => { if(!menuOpen){ menu.classList.add('close'); showMenu.classList.add('open');…

VIEW QUESTION

How to hide navigation Item in react-native navigator? – React native

I'm new to React Native. I have to make an app for the WordPress backend. I've four items in DrawerNavigaton, Home and Categories, PostPage and Category screens. <NavigationContainer> <Drawer.Navigator> <Drawer.Screen name="Home" component={Home}/> <Drawer.Screen name='Categories' component={Categories} <Drawer.Screen name="PostPage" component={PostPage}/> <Drawer.Screen name='Category'…

VIEW QUESTION

React navigation params object empty – React native

When i try passing the params to my review screen it comes up undefined. I'm using "@react-navigation/native": "^6.1.3" and "@react-navigation/stack": "^6.3.12" App.js import 'react-native-gesture-handler'; import { StyleSheet, Text, View, Button, TouchableOpacity, FlatList } from 'react-native'; import {NavigationContainer} from '@react-navigation/native'; import…

VIEW QUESTION
Back To Top
Search