Category "reactjs"

Material UI: how to switch from sidebar to bottom navigation when using grid

I want my sidebar to be bottom navigation on mobile view. How can i switch these components depending on the size of the screen. I wonder is there a way to do i

"SyntaxError: Unexpected token < in JSON at position 0"

In a React app component which handles Facebook-like content feeds, I am running into an error: Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected

Have to do an additional click on page to interact with it after gesture finish

I am using react-use-gesture in combination with react-spring to implement mobile menu dragging in my website. The issue is, when I am using drag to close the m

mongodb net::ERR_CONNECTION_REFUSED

I have just write post method for inserting data in MongoDB.when submit form for fetch data form frontend that time gets this error List item net::ERR_CONNECTIO

react-native-webview Typescript error: 'WebView' cannot be used as a JSX component

I am trying to set up a simple React Native app using Expo with TypeScript that shows a WebView. My App.tsx file contains the following: import Constants from '

loop through array issue

I am calling an API that returns an array, i am trying to loop through the array but console is saying that the lenght is 0, never seen anything like it before

"Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0" ERROR -- NodeJS, MongoDB, React Application

I'm trying to fetch an array from my user database from my react app. The response I'm getting is an HTML file, but I'm not sure why it's not working as I have

CRA - Jest mock loses the mock implementation

I'm trying to use __mocks__. src/shared/state/use-some-state.ts export const useSomeState = () => { return { value: 6 }; } which is exported from an index

How to install next-js with react 17?

How I can install next.js with React 17? When I type: npx create-next-app --ts, npx installed Next with React 18, but I can't use React 18, because Stripe not w

react native render error (view config getter callback for component 'div'?

I have a problem with react-native. I'm trying exercise to do todo app from how I watch on youtube lessons. Can't understand where is my fault? Youtuber instruc

Rendering based on Enum in ReactJS

In App.js import "./styles.css"; import { IconType }, Icon from "./icons"; //<-this line gives syntax error export default function App() { return <I

How to add loading Spinner when first time loaded the website

I'm using React. New in React and nodejs. My application takes a few times before it loads the component and that time is spent in loading resources and validat

Customize the default font family on Strapi V4 headless CMS?

How can I change the default font-family of the admin Strapi v4 dashboard? because I found nothing of how we can change the default Strapi v4 font-family

How to upload images to Firebase web v9 using reactjs

I am having an issue concerning uploading images to firebase but using web version 9. I am following along with a toturial on one of the platforms in which he i

How to solve "Firebase: Error (auth/invalid-api-key)" error in react app environment

I'm using environment variables to avoid from hardcoding my API key into my config files. Tried a lot of things: making sure I copied the API keys correctly, re

Dynamically build classnames in TailwindCss

I am currently building a component library for my next project with TailwindCss, I just ran into a small issue when working on the Button component. I'm passin

Dynamically build classnames in TailwindCss

I am currently building a component library for my next project with TailwindCss, I just ran into a small issue when working on the Button component. I'm passin

Popup which persists through page redirect Next.js (React)

I am using Next.js for one of the projects that I work on. I wonder if someone could help me with an advice on how to show a popup (popup component, I think it

Accordion height automatically increases when any accordion expands in same row mui

Accordion height of any accordion automatically increases when any accordion expands in same row mui, Here's my code:- {[1,2,3,4,5].map((i)=>

How to break eslint or webpack build if any component has imported data from ./Stories/* folder

We have a React/TS project which bacame too big. In this project we use eslint (airbnb) and StoryBook. Our components structure is: /Stories <-- folder for S