Category "reactjs"

Uncaught TypeError: dispatcher.useSyncExternalStore is not a function

i am trying to change the state of bulma model using useSelector and useDispatch like this const isState = useSelector((state) => state.isActiveState

React-Router-Dom <Link /> tag is changing URL but not rendering the Component

Header Component import React from "react"; import { BrowserRouter as Router, Link } from "react-router-dom"; import { ReactComponent as Logo } from "../../asse

React Hook "useState" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function

React Hook is not working, giving error as attached screenshot:- My Code:- import React, { useState} from 'react'; import WEBINAR_LIST from './webinar_data';

React-Phone-Input-2 customize border of input on focus

I would like to change the color of the border of the input on focus, but not sure how to achieve it. I can change the styles the component but not when focusin

react js send object to node js

I send the object to the backend(Node js) when API call. but I check objects using console log. I checked using POSTMAN. When I checked POSTMAN, I worked very w

react-spring parallax not working on refresh

<Parallax pages={2} ref={ref}> <ParallaxLayer offset={0} speed={1} factor={2}> <Snowfall snowflakeCount={35} color={'#53bdfc'} />

Test correct SVG component renders with jest and react-testing-library

I have an svg inside a React component that renders conditionally. <div className='avatar'> {gender === true ? <MaleAvatar /> : <FemaleAvat

Draw line between 2 elements in reactJS

I'm working on a flights agency website, and at some point I need to draw some lines between elements that are being added dynamically. See the image to underst

How to configure NextJS Server API GraphQL Subscription

currently i'm learning how to develop an application using graphql. I'm facing the error of implementing the subscription inside my application resolver.js cons

Gitlab CI: why do I get an error when I try to define the pages stage?

I'm trying to publish a create-react-app on Gitlab, using its CI. This is my .gitlab-ci.yml file: stages: - build - pages build: image: node:16 stage:

Best practice for configurable React component/component library

I'm working on a React component library and I'm trying to figure out what would be the best way to make it configurable. I'd want to achieve something similar

React Router V6 shows blank page

I am facing a problem. I am trying to use React Router but it keeps showing me a blank page. Here is my code: App.js: import React from "react"; import { Browse

Unexpected use of comma operator React

Line 85:74: Unexpected use of comma operator no-sequences Line 85:153: Unexpected use of comma operator <div className={"card text-white bg-success m

How can I use Mongo DB's database to subtract and add a quantity from an item using the put method from a button? [closed]

what problem my code ? I actually want to reduce and increase the quantity of some items from one button but I can't understand what is wrong

React DatePicker Not showing the selected date in useState

I have a code that should show the calendar so that user can pick the date : Problem is the useState is not picking the selected date. Please help me. Below is

How to check if a key is pressed/held down using event listeners and hooks in React Native?

If I need to know whether a key like the shift key is currently being pressed, how can I find that info? This solution should assign this info into a single var

How to make React-Recharts responsive for all kind of device particularly?

I'm using React Recharts to show some chart data. I am using ComposedResponsiveContainer for my app component and the heights of it is set to "100%" by default.

React JSX Invalid ARIA attribute `ariaLabel`

react jsx: <button ariaLabel='label'>click</button> rendered html: <button arialabel="label">click</button> console warning: index.js:

Plugin React was cnonflicted between package.json

Any project I create using npx create-react-app When compiling the project, the same message always appears: Plugin react'' was conflicted between package.json

I would like to persist add in store without reducer. However, I am not sure how to setup my store accordingly with this

const store = createStore( rootReducers, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() ); let persistor = persistSt