Category "reactjs"

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

after doing "npx sb init" (react storybook): node_modules/react-router/index.d.ts:151:74 - error TS1110: Type expected error

I am working on a large typescript react monorepo. In one of the packages I added react storybook using "npx sb init" After doing that, when I did a yarn build

React - pass context to SweetAlert popup

My context is as follows: import React, {createContext, useEffect, useState} from "react"; export const CartContext = createContext(); const CartContextProvid

UseStore is async? How to ensure that store-data is loaded completely?

I have a serious problem with State Management in React. I am using Zustand and it works pretty well. However, when I access the store and try to output it one

Storybook (with Vite / Typescript / MDX) doesn't show ArgsTable

I'm trying to show the table with props on a MDX docs page, but whatever I try, the table only shows: "No inputs found for this component. Read the docs >" I

React-Typescript: Module '"react-router-dom"' has no exported member 'RouteComponentProps'

I have a project and with this project I have a login page and I want to use "RouteComponentProps", but I got this error: Module '"react-router-dom"' has no exp

How to write a TypeScript NPM package with JSX property suggestion/autocompletion for intellisense

I created a mini UI library and published it to NPM registry. My library is written with strongly typed styled-components (TypeScript) and can be imported in Re

I get an error undefined reading push in React

This is my code. I'm having an error undefined reading push. I want to pass City to another component. const onInputCityChangeHandler = (e) => { s

useContext gives App.js:24 Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))

I am using an Auth Context Provider in my App, which is initialised in this file: authState.js import React, { useReducer, createContext, useContext } from "rea