Category "reactjs"

React-URLSearchParams returning Null object

I am using the following code to retrieve query parameters from URL but URLSearchParams returns an empty object. PS: uselocation.search returning correct output

'conditional' css in next/react

I'm trying to apply styling depending on the element's parameters. I've tried to search for "conditional css react", "conditional react style in css" and other

Unable to set theme in latest MUI v5 with ReactJS

I am building a small, simple Wiki for myself; just started learning React, although I've been working with JavaScript before. I cannot seem to set the theme. I

React - Why is geolocation state undefined when accessing it from another function

I'm trying to get the latitude and the longitude from geoLocation and use it to fetch data from a weather api. The problem however is that as soon as I pass lat

Beautiful Dnd is not working with react@18

I am trying to include beautiful dnd package in my project but i got error while installing the package. Please tell me if there is any other package like it or

Changing the data in a child component without changing it in the parent

I am making changes to a set of data and the data is held in a parent components state I pass that data to a 2nd component but when I make changes to the data i

How to change input display style in Autocomplete

I'm using Autocomplete component from Mui. It has the default display style for multiple input values like this: . However, I hope to make it like how it would

Jest test passes but .. has console message You are trying to access a property or method of the Jest environment after it has been torn down

My test passes but has a console refrenceError: You are trying to access a property or method of the Jest environment after it has been torn down. Test: import

ReactJS ARIA (Accessible Rich Internet Applications ) Integration

I am learning ReactJS and I want to implement ARIA elements so that website is accessible through Screen Reader. Are there any packages present to achieve this?

Mocking a function in jest which returns Promise<string[] | never>

I'm using React+JEST to test an existing component. It has a function filterDeliveries like so : const filterEmptyDeliveries = (arr): Promise<string[] | neve

How to include Tailwind CSS styles from React component library into the app CSS bundle?

G'day, I am building a React component library with TailwindCSS and ViteJS. The library outputs each component as a separate JS file, for example: // @component

How to use React for Wordpress templates without the Gutenberg editor

My current Wordpress setup uses the classic editor, ACF and Twig templates. Most of the theme is hardcoded in the templates, and only values are pulled from ACF

React-Table v7 - can't useFlexBox to include resizing to the table

I'm working on react-table to build a reusable table with all of the functionalities put together (Grouping, resizing, filtering, sorting, pagination, etc.). He

How can I update the value from the database in React

When I edit the form here, I need to show the value in the database. so how can i get this value const dataValue = ndata.filter((obj) => obj._id === dataid )

Setting state in useEffect hook does not change state value

am writing an app in react native and i got a problem with useState and useEffect hooks. I would like to change increment state value by one every 10 seconds. H

React - Module parse failed: You may need an appropriate loader to handle this file type 6:15

Help me with this error: NPM run error my webpack setting: module.export = { module: { rules: [ { test: /\.js$|\.jsx/, exclu

axios returns promise instead of data

I am querying some data from IPFS using axios, the problem is that after calling the specific api the return value is a promisse from axios. const getNFTDetail

react npm run build fails with Unexpected '/'

The react app is completely fine when I run "npm start" and everything working without errors. But when I try to build the app, it gives the following error: re

Strategy for deploying finished React app in Wordpress

I'm developing a web application using React and WordPress as a headless CMS, since WordPress as a backend is easy for my client to access and change. The React

How to apply media query in nextjs [closed]

Media Query in nextJs Application - I want to apply media query in my website so that that i can make it responsive how can i do it? I want to