Questions tagged [reactjs]

React is a JavaScript library for building user interfaces. It uses a declarative, component-based paradigm and aims to be both efficient and flexible.

397,841 questions
0votes
0answers
3views

react navigate to external page post json data for print service

I have a Print service which requires parameters. After posting parameters to the service url, it renders a page. I m trying to build something like the code below. I want to post json data to an ...
0votes
0answers
6views

Video.js doesn't work in next.js with server side rendering

I'm trying to configure video.js in a next.js project but it doesn't work. At the beginning of loading the player appears black and disappears suddenly. In the console there is a warning saying the ...
0votes
0answers
12views

How to send a property from an array of object from a child component to the parent component?

I have App, that is the parent component and I have the Child component: The Child component gets a props called items so it can be reused depending on the data. It the example there is data, data1 ...
-1votes
0answers
6views

what is the right way to create routes,dao,api?

This is the first koa backend that I developed and can I know is it correct or wrong dao import { ObjectId } from 'mongodb' import client from './index.js' const ...
0votes
0answers
9views

React Calling function from other function, doesn't get the latest state value

I have a reducer to manipulate the Tableprops such as pagination, order, and filter. The TableProps will always updated everytime the is a change inside the table and its work fine. But when I call ...
0votes
0answers
9views

React Router v6 redirect with Params and SearchParams

I am currently trying to set up my routing for a new project. What I am attempting to implement is if a user access /home/user/settings and they are not logged in, it will redirect them to /login?...
0votes
0answers
6views

Express routes don't return data within Docker conatiner

When the app starts, the home page immediately makes a request to my googleRoute to retrieve some review data. When ran locally and visiting localhost:3001 the app starts up and displays the data fine....
0votes
0answers
14views

UseSelector undefined is not a function

Throws an error undefined is not a function (near '...(0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(state => state.files).map...'). enter image description here I wrap it in a function - ...
0votes
0answers
11views

Unit test in react

How to write test cases for the below code with "removefocus" and "removefocusfromcontrol"
0votes
0answers
9views

React set dangerouslySetInnerHTML as empty

Is it ok to set dangerouslySetInnerHTML as empty? I am using dangerouslySetInnerHTML to render SVG HTML only if a condition is met. My code: <div dangerouslySetInnerHTML={ custom && isSVG(...
1vote
2answers
13views

enlighten me about UseEffect Loop when data not changing

Hello i have this component and after some reading i have undestand that the useEffect is called again when data in array change but in my case that's not change and i get into a loop. export default ...
0votes
1answer
16views

Add site search to user browser

I have a website and I want to add my site search to the user browser once they visit my site. Sample site searches When user searches Thanks so much
0votes
0answers
12views

React counter with setInterval() and setTimeout()

I am trying to create a function that increases the count state by 1 every set interval of time. I would like this to then stop counting after 1s has passed while a progress bar pauses to display some ...
0votes
1answer
16views

onChange Event not Triggered in React JS

<div className="col-md-2"> { authorities.map((data,index) => ( <> ...
0votes
0answers
21views

How to solve problem of checking all checkboxes

I'm trying to do a functionality, where if I click on the parent checkbox, it checks all the child checkboxes on every page of my table. But according to my logic, I can only check all checkboxes on ...

153050per page