ReactJs

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

58 votes
1 answers
2.5K views
ERR_CONNECTION_REFUSED when I start nightwatch via the chromium driver

package.json { "name": "assignment10", "version": "0.1.0", "private": true, "dependencies": { "@da

avatar
Patsy
0 1 0 9
asked 07 September, 2021
59 votes
24 answers
773 views
How to push to History in React Router v4?

In the current version of React Router (v3) I can accept a server response and use browserHistory.push to go t

avatar
Rufus
0 1 0 9
asked 07 September, 2021
55 votes
22 answers
2K views
How to specify a port to run a create-react-app based project?

My project is based on create-react-app. npm start or yarn start by default will run the application on port 3

avatar
Patsy
0 1 0 9
asked 07 September, 2021
55 votes
15 answers
3K views
How to fix missing dependency warning when using useEffect React Hook

With React 16.8.6 (it was good on previous version 16.8.3), I get this error when I attempt to prevent an infi

avatar
Rufus
0 1 0 9
asked 07 September, 2021
62 votes
16 answers
2.5K views
Error: 'node-sass' version 5.0.0 is incompatible with ^4.0.0

I've created a blank React project, using the command: npx create-react-app on npm v7.0.7 and Node.js v15

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
2.4K views
Hide keyboard in react-native

If I tap onto a textinput, I want to be able to tap somewhere else in order to dismiss the keyboard again (not

avatar
Vi
0 1 0 9
asked 07 September, 2021
57 votes
30 answers
2.2K views
React - How to get parameter value from query string?

How can I define a route in my routes.jsx file to capture the __firebase_request_key parameter value from a UR

avatar
Tuan
0 1 0 9
asked 07 September, 2021
52 votes
10 answers
1.7K views
What's the difference between "super()" and "super(props)" in React when using es6 classes?

When is it important to pass props to super(), and why? class MyComponent extends React.Component { constru

avatar
Majorie
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
1.7K views
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function but got: object

I am getting this error: Uncaught Error: Invariant Violation: Element type is invalid: expected a strin

avatar
Xavier
0 1 0 9
asked 07 September, 2021
60 votes
8 answers
591 views
What is the difference between using constructor vs getInitialState in React / React Native?

I've seen both used interchangeably. What are the main use cases for both? Are there advantages /

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
53 votes
20 answers
2.7K views
Can you force a React component to rerender without calling setState?

I have an external (to the component), observable object that I want to listen for changes on. When the object

avatar
Nereida
0 1 0 9
asked 07 September, 2021
54 votes
30 answers
2.9K views
Programmatically navigate using React router

With react-router I can use the Link element to create links which are natively handled by react router. I s

avatar
Hilario
0 1 0 9
asked 07 September, 2021