Category "reactjs"

How to use socketio inside controllers?

I have a application created with Reactjs,Redux,Nodejs,MongoDB. I have created socketio in backend side. server.js const express = require('express'); const mo

How to remove duplicated react? (Invalid hook call)

When using libraries (I tried styledcomponents and react-router), an error appears in React applications: Warning: Invalid hook call. Hooks can only be called

Mock Service Worker returns empty

I'm new to react testing library. I am trying to test a simple component that call some apis and then it fills inputs with the data of these apis. But when I ru

Mock Service Worker returns empty

I'm new to react testing library. I am trying to test a simple component that call some apis and then it fills inputs with the data of these apis. But when I ru

Modifying Shopify Polaris Styles - Reactjs

I am trying to modify Shopify Polaris Button components colors for React, I tried to change style.css file but nothing happened. Any idea how to do so? App.j

How can I show error message when user email and password doesn't matched

I'm trying to add firebase email-password authentication using firebase and react firebase hooks. I want to show an error message when user try to sign in and t

How can I keep my useSelector() variable from a redux store updated after each dispatch?(Redux Toolkit)

So I'm using React Native with Redux Toolkit and I'm facing this issue where once I dispatch and decrement a store value, the variable inside the component that

React: loading two different images for mobile and desktop

Inside a React app, I need to load two different versions of the same image on mobile and desktop. Both images are long SVG files. For this I created an extra c

React state doesn't work, it doesn't rerender components

I have problem with react updating state. Well, I didn't touch react for a while and I want to remember some things so I've started from beginning. However, I f

React Native IllegalViewOperationException: StackOverflowException Android

CONFIGURATION I have this setup: RootNavigation import React from "react"; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import

I m getting this error, i run my react native using expo

While trying to resolve module idb from file ` C:\Users\chouk\OneDrive\Bureau\my-app\node_modules\@firebase\app\dist\esm\index.esm2017.js , the package C:\Users

SetValues Formik Function disables Formik HandleSubmit

I have a form that can handle submission a couple of different ways. The difference is managed by a flag in the form Values that can either be true or false. I

create-react-app throws error: "Missing dependencies in package.json"

So I'm trying to run reactjs official tutorial and with the first line of code: npx create-react-app react-tutorial ...I get the following error: npx: inst

Problem with styling MUI Slider with pure CSS

In vain I try to style the mui slider with the help of CSS. The first approach it works perfectly. However, when refreshing the page, the slider is moved back t

React hidden navigation menu

I am working with ReactJS at the moment (I am very much a beginner). What I wanting to do is show/hide a menu component when a link is clicked in the site navig

How can I use redux and graphql with apollo client in the same react app?

I'm working on a project, and I'm using apollo/client, graphql in react, and for the global state management, I have to use redux. I'm quite sure I'll have to h

react-suneditor css not loading on production

I set up react-suneditor just as it said in the docs, using dynamic loading since I'm using Next.js. import React from 'react'; import dynamic from "next/dynami

How to make non-sibling elements have the same height in React

Is it possible to make non-sibling elements to have the same height (the height of the tallest one) in React? That obviously cannot be done with CSS. That wou

How to import and play all audio files from a directory in React?

I am trying to play each audio file located inside a directory using React. I can play one file as follows but I do not want to import each file since there 70

Adding styling to rails react component wrapping div

I'm using react_component in my Rails project. This inserts a wrapping div for the react.js component, e.g. <div data-react-class="ButtonSwitchToTab" data-r