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.
292,257
questions
0
votes
0answers
6 views
How to set X coordinate for each bar with react chart js 2?
I want to make a chart with min and max vertical lines and bars between them. I can't find information how to set bars' X coordinate or make custom line plot with vertical 'bars' instead of points.
...
0
votes
0answers
4 views
ReactJs Login Authentication issue both conditions are being executed
I'm trying to do a Login authentication with LocalStorage and SessionStorage and I've wrote a condition to execute every Login attempt. and when I'm trying to login with the wrong username and ...
-1
votes
0answers
11 views
Hovering over one div to trigger animations in another div
This is for my navbar on my personal website. I have my name displayed on the left side of the Navbar. I am trying to make a "wave effect" so that when I hover over my name (made of spans ...
0
votes
1answer
11 views
Sending get request with parameters in React to Java Backend but showing No 'Access-Control-Allow-Origin' header is present on the requested resource
I am trying to send a get request with 2 parameters page and limit to the Java Backend Server and it is showing the following error:-
"Access to XMLHttpRequest at 'http://localhost:8080/...
0
votes
0answers
4 views
Response Silently Failing When Data is Too Large in Socket Response from Node to React
From my Node backend I am successfully getting some data as a buffer and passing it down in a response to my frontend React app via socket.io, like so:
const docBuff = await merger.doc.asBuffer();
...
0
votes
0answers
8 views
React router can I nest routes
In my app I have an authentication system and a user system(SuperUser, ...). I have a route that checks if authenticated and another route that checks if the user has access to the page.
This is the ...
-3
votes
0answers
16 views
Is && both logical AND and a way to compare stuff? [duplicate]
Is this something special in jsx or is this also used in JavaScript? I was following a tutorial and this was done. What does it do, and is there any documentation about this?
{showAddTask && &...
0
votes
1answer
17 views
How do I keep pagination in a fixed position?
I make a task tracker where I can display 4 tasks at a time. When there are more than 4, the following tasks get added to the next page using React pagination.
I would like the page numbers to be in a ...
0
votes
0answers
9 views
Cant access object values which is a state in React
Hey guys i am trying to implement a sorting feature for a minor application. Now i am facing some issues. I call the sorting method like this:
onClick={() =>
sortEmployees("...
0
votes
0answers
11 views
How to set the input type date to null after submitting the form using React Js
I have problem on my text field input type date, I want to set all the input date to null after I submit the inputted data. I don't understand why this input type date still the value set on the input....
0
votes
0answers
9 views
testing callback return value with react-hooks-testing-library
In this example we have a simple hook called useLog that returns a method. How do I test that it gets returned with react-hooks-testing-library. I am trying to figure out how to write the expect.
The ...
-1
votes
0answers
14 views
useCallback with Async function
I am new to useCallback and am seeing a bunch of re-renders with calling my API.
When the component loads, it calls getPosts() from a useEffect hook, that way it get's the initial posts from the API.
...
0
votes
0answers
7 views
How to reset column filters in PrimeReact Datatable?
I am trying to figure out how to create a button to reset the column filters in PrimeReact Datatable. I am able to click the button and have the sorting be rest on the table, but the value in the ...
0
votes
0answers
22 views
Component re-renders every time I filter which affects the behaviour of my sorting icon
I have a filtering component and a table component. If I go to sort a specific column for example address in ascending order, my arrow icon in the table points upwards (which is expected), but then If ...
-1
votes
0answers
11 views
React.js setState updates state, not reflected in render [duplicate]
There are a million useState questions, so I apologize if this is a duplicate. However, I couldn't find a question past 2018 that covers this issue.
I am trying to learn front-end web development. I ...