Questions tagged [reactjs]

React (also known as React.js or ReactJS) is a JavaScript library developed by Facebook for building user interfaces. It uses a declarative, component-based paradigm and aims to be both efficient and flexible.

Filter by
Sorted by
Tagged with
reactjs
0
votes
0answers
6 views

update Axios Url with Onclick event in react

I am working on an API using axios: componentDidMount() { //limit is on the end of the url const limit= this.state.limit axios.get(`http://api.giphy.com/v1/gifs/search?q=sth&api_key=...
0
votes
0answers
9 views

Trying to remove element from array based on indexOf method in Gatsby.js

Currently working on e-commerce store in Gatsby.js, there is an issue. In console, array splices correctly but nothing actually changes in Cart. It looks for me like Gatsby isn't updating value of ...
0
votes
0answers
5 views

Unsticky after a specific element that also is overlaying content using react and IntersectionObserver

I'm trying to create some sort of paywall type effect where at the beginning of a page, there is a fixed div at the bottom of the screen, that scrolls with the user. The fixed div has a bunch of ...
0
votes
0answers
4 views

I am developing video chat application with laravel and pusher. But I am stuck in implementing a way to let users call each other

I have been trying to build video chat application using Pusher and Laravel. When User 1 calls User 2, it doesn't work and call doesn't happen. It doesn't have any error in console log. Can any one ...
0
votes
1answer
22 views

React.js - converting JSX to raw HTML string

I am currently thinking about making a CMS project and one of the features I want to add is making a HTML page by clicking on buttons then storing that HTML in a JSON, of course in a string format. ...
0
votes
1answer
21 views

Get the error of a JSON Validation List in ReactJS

On my api test, it was able to run as the image below. but, when I try to code in React.JS, the user Id cannot be pass in. What is the problem of this? But when I try to code in front end, the user ...
0
votes
0answers
14 views

Whenever I try to run my React app I get this message “GET http://127.0.0.1:8080/bundle.js/ net::ERR_ABORTED 404 (Not Found)”

As I said in my title, whenever I run live-server I get a 404 not found for my bundle.js file and I cant find out why. My index.html page looks like this: <html> <head> <...
0
votes
2answers
26 views

Difference between state data and destructuring in react

This is very basic of React but I really need to understand why it is behaving in this way. Is there any difference between this part of code : Example1: increment = () => { const { count } = ...
0
votes
1answer
11 views

Map of an array in a functional component and access to a specific object

function TypeArticleOne(props) { let apiData = props.apiData; const [ therapists, setTherapists ] = useState(apiData.topProfiles.therapists); const [speciality, setSpeciality]= useState('ABA'); const [...
0
votes
0answers
6 views

MongoDB to React table

I want to display some data from MongoDB inside a React table. There are a number of say "layers" that one needs to manually glue to get going. What I would like to do is to do this the proper way (if ...
0
votes
1answer
10 views

redirect all /api/.. requests to express

I currently have a nginx server running with a react app as frontend and a express server as backend. The express server is running at localhost:5000/ server { listen 80 ; server_name ...
-1
votes
0answers
16 views

how to mock http post request in react + jest?

I am trying to write test cases of my functions.but I am not able to mock my http request so that my test case is failed? can you please tell me how to spy or mock my http call.After mocking http ...
0
votes
0answers
12 views

react native navigation payload error for login

I am facing a issue with my login screen. Every thing works quite well But my problem is after successfully making a login i am getting a payload error. I am using a function component not a class ...
0
votes
0answers
19 views

How could I reset the state of my component according to changes in the parent component?

In order to practice what I have learnt in React, I am trying to make some kind of a QCM in React. the architecture of the components of the application This image describe the architecture of the ...
0
votes
3answers
21 views

Rendering a new component inside componentDidMount - React

I will have to render a new component after all the expected components are loaded. I will need a timeout based on which the the new component has to be rendered. So this new component has to show up ...

15 30 50 per page
1 2 3 4 5 12646