Most voted "react" questions
It is an open source Javascript library for creating user interfaces. It is maintained by Facebook, Instagram and a community of individual developers and other companies
Learn more…1,420 questions
Sort by count of
-
23
votes3
answers4443
viewsWhat are the main differences between Angular, React and Vue.js?
On a project SPA which will soon be used also in a mobile app, I need to know the main differences to decide which one framework should I specialize.
-
20
votes3
answers2779
viewsWhat are React Hooks?
I would like to understand the concept and if possible with examples of this new Feature react. What will change in the way you create projects with React? The community seems to have enjoyed, what…
-
19
votes3
answers1755
viewsHow does the Flux architecture work?
Reactjs brought with it a new architecture, also used for Facebook and Yahoo! I wonder how it works, what exactly is a Dispatcher, Store, Action... If possible, on the basis of the MVC.…
-
14
votes1
answer7334
viewsWhat is the difference between props and state in React.js?
What’s the difference between props and state in React.js, what differences and how they should be used?…
-
14
votes2
answers355
viewsWhat are the main differences and advantages of using Shadow DOM and Virtual DOM?
Analyzing carefully for a better performance of an application, what are the main benefits in using one or the other and their differences? Angular for example works with the Shadow DOM approach,…
-
11
votes1
answer1726
viewsWhat is reactivity in Javascript?
I see in frameworks as Angular, Vue, React, the concept of reactivity. I’m totally naive on the subject, and as far as I know, the concept of reactive programming is basically performing…
-
10
votes1
answer812
viewsFailed propType: Invalid prop `Children` supplied to`Router`
I created a project to study React and I’m trying to uncouple my Header from the app by creating a component for it. I created a file Header.jsx and passed the code there but I’m getting the…
-
10
votes2
answers12658
views -
9
votes2
answers588
viewsWeb Components - What is the difference between Polymer and Reactjs?
With the advancement of the web, we now also have the web components. Google created and maintains a framework named Polymer, although it does not have much compatibility with several browsers. At…
-
9
votes1
answer1307
viewsWhat is the advantage of front-end frameworks like React?
I was talking to some friends and in the conversation they told me that frameworks like React would be mandatory for front end programming nowadays. I wanted to know your opinion on this, on why to…
-
9
votes4
answers2034
viewsDoes React affect SEO?
Since HTML is generated via Javascript and until the page is loaded there is no useful HTML in it, SEO can be affected if I make a 100% web application in React - a call single page application?…
-
8
votes2
answers2357
viewsWhy is it necessary to use bind when working with ES6 and Reactjs?
Using ES5 in Reactjs development, a component can be declared as follows: var MyComponent = React.createClass({ alertSomething: function(event) { alert(event.target); }, render: function() { return…
-
7
votes2
answers2451
viewsReact, why use props in the constructor?
Why should I wear props within the constructor and of props? constructor(props){super(props)} Why use props in the constructor? Why use props in the super? Why use super?…
-
7
votes1
answer657
viewsReact Component vs Stateless Functional Components
I know that in React there are two types of declaration for a component. React Component export default class App extends Component { render() { return ( <Elemento/> ); } } React Stateless…
reactasked 5 years, 12 months ago João Pedro Schmitz 2,974 -
6
votes2
answers5261
viewsWhat are the real differences in creating a project with Expo and without Expo?
Recently I saw several items that differentiated a project with or without Expo, but currently the Expo includes many things where before we needed to touch native modules: Sqlite, image…
-
6
votes3
answers3708
viewsWhat is the difference between useMemo and React useCallback?
I know that useMemo and useCallback are two new Hooks React. However, I still don’t quite understand the difference between them. What’s the difference between "return a memoised value" and "return…
-
5
votes1
answer646
viewsCorrect use of DOM with React.js
Knowing that Reactjs uses a virtual DOM where elements are processed into a DOM representation in memory so that all changes are made faster then it would be "wrong" to use findDOMNode to directly…
-
5
votes1
answer342
viewsReact Native - Listview
Does Reactnative Listview accept an array of arrays ? Because I need to receive the API data as follows :…
-
5
votes1
answer192
viewsBug when reordering React component list
I have a component that loads a list of components <ComponenteReordenavel> which is reordered according to the user’s taste. The bug happens when I modify the style of that component and…
-
5
votes3
answers4761
viewsRestrictions in the React text field
It is possible for a text field to receive only the characters below? numeros | espaço | barra (/) | traço (-) The kind field number does not help me in this case, it would be nice to use the type…
-
5
votes1
answer5766
viewsDifference between onClick commands in React
When it comes to callback functions in Reactjs, what is the difference between the options below? onClick={() => this.onFunctionCickCall()} onClick={this.onFunctionClickCall()}…
-
5
votes2
answers215
viewsDid "Class Components" die in React?
Before the React update 16.8 it was not possible for functional components to be internal, so Hooks arrived to solve this problem, so the functional components became the standard of React. Then the…
-
5
votes2
answers172
viewsWhy don’t I need to declare the parameter in the function?
In the React documentation he brings an example of form, when the input receives some property value onChange is called with the function handleSubmit(event) in that way onChange={this.handleChange}…
-
5
votes1
answer820
viewsElement has the type any implicitly when trying to access a property of a module namespace (object)
Works: import * as Icons from 'react-icons/fa'; ... const teste = 'FaAddressBook'; const Icon = Icons[teste]; Doesn’t work: import * as Icons from 'react-icons/fa'; ... const teste:string =…
-
5
votes3
answers635
viewsLocal Push Notification iOS
I’m using the lib React-Native-push-notification to schedule notifications in an app,. For Android I am able to create, but the same does not work for iOS. I wonder if you have any alternative to…
-
5
votes1
answer101
viewsHow can I update a parent status via child in React?
I need to update a parent’s status via a link click on the child’s Komponent, but I’m not getting it. I’m trying this way: Component Pai export default function Home() { const [board, setBoard] =…
javascript react web-application app componentasked 4 years, 2 months ago João Paulo Santos Pessoa 51 -
5
votes3
answers196
viewsWhat causes my component to be rendered again in React?
Very commonly I see talk that a component of React will be re-rendered because of a prop, state, value of context altered, etc.. What are the factors that actually influence the re-rendering of a…
-
5
votes1
answer122
viewsWhat is the prop "key" for in React?
When rendering a dynamic list in React or React Native, I receive the following warning: Warning: Each Child in a list should have a Unique "key" prop. Despite this, things seem to work well without…
-
4
votes1
answer104
views -
4
votes1
answer126
viewsAlternating states of a js application
INTRODUCTION I’m developing an app using Electron and google maps, I need to control the state of one of the windows, for example: the user clicks the button and from this moment on all click on the…
-
4
votes2
answers1062
viewsWhat does the data-reactid attribute mean?
I was looking at some websites, and I saw, in the source code of some pages, an attribute called data-reactid, embedded in elements div. What is this attribute, what is its function and what…
-
4
votes2
answers434
viewsJavascript - React JS
How do I take a part of a JSON, put it in a variable and then throw that variable in a "Widget" of my layout? Example: (http://ip.jsontest.com/) I want to take the value of "ip", and put in my…
-
4
votes2
answers880
viewsAdjustments to the React.JS CSS
I’m developing a simple system in React and I’m having difficulties in the visual part, for example for mobile: I need to leave my system this way: Is that way: The web system needs to be like this:…
-
4
votes1
answer92
viewsWhat are Renderless Components?
What exactly is the utility of a Renderless component? Is there any real advantage to its use?
-
4
votes4
answers178
viewsDoubt about React (props or state)
Good afternoon I’m beginner with React, I started reading his documentation and I had a little question: would like to know the difference between prop and state? And when I know when to use a prop…
-
4
votes1
answer2549
viewsHTTP React Native Request
an API sends a status:false the code taken status. While status==false, will be rendered the image of exclamation.png and message 'Pedido em Análise'. Case status change to true both image and…
-
4
votes1
answer3776
viewsHow to create MASK with pure JS in React
I am transforming a site HTML, CSS and jQuery in React but I saw that the use of jQuery is lagged in React since it is possible to create some components faster and simpler, my doubt is how to…
-
4
votes2
answers115
viewsIntegration between Mailchimp and React Native app
I’m a beginner in React Native. I’m basically trying to accomplish the integration between my application in React Native and Mailchimp, what I want to do is: Once the user provides us with his…
-
4
votes4
answers29846
viewsRequest with Axios and React blocked by CORS policy
I’m trying to request an API using Axios: axios.post('http://api.teste.com.br/v1/getToken', { withCredentials: true, auth: { username: 'usuario', password: 'password' }, headers: {…
-
4
votes1
answer2934
viewsHow to pass parameters on events in React?
Assuming the code below (line 15): import React from 'react' import ReactDOM from 'react-dom' const items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] function App() { function handleClick(item) { alert(`Você…
-
4
votes1
answer582
viewsReact.js problem
I am making an application in React.js and gave this problem: Element type is invalid: expected a string (for built-in Components) or a class/Function (for Composite Components) but got: Undefined.…
reactasked 5 years, 7 months ago Thales Vinicius 53 -
4
votes2
answers16832
viewsReact Hook useEffect has a Missing dependency: .... Either include it or remove the dependency array React-Hooks/exhaustive-deps
I’m getting the following warning when using the hook useEffect: React Hook useEffect has a Missing dependency: 'connect'. Either include it or remove the dependency array…
-
4
votes1
answer744
viewsWhat are the dangers of keeping the Oauth2 token on the frontend?
I believe I am paranoid, but I could not find any situation similar to mine (if you know pass me the link, I am grateful) so I wanted to ask this question to get a definitive answer. Before the…
-
4
votes4
answers1892
viewsError React-Nactivate-Esture-Handler in version React-Native 0.60.0
Guys, I have a problem with React Navigation after the last update of React-Native for version 0.60.0 The react-native-gesture-handler is not compatible because of a autolink that the new version of…
-
4
votes1
answer196
viewsDoubt about React in Javascript
I am a C programmer and recently I started studying Javascript, I already have a notion of programming but as I come from a language relatively "simple" I am facing difficulties in understanding…
-
4
votes2
answers86
views"Child already has a Parent, it must be Removed first" when sending new object to Reducer
I have a table where I want to sort your data. The table is copulated through the values of this useSelector() const users = useSelector(state => state.userStates.users) When the user clicks on…
-
4
votes1
answer63
viewsYup Mixed does not work notRequired or nullable
Good afternoon, I am validating the data of a form with Yup and need that only images can be loaded, so I used the following code: // formato que pode ser upado no input de email const…
-
4
votes2
answers165
viewsFunction with two parentheses? function()()
I don’t know how to describe why I couldn’t find information about. kkk At the end of the code when exporting "connect", what does the second parenthesis do? What is called this syntax? import React…
-
4
votes1
answer207
viewsHow to render the same component several times in React?
I’m trying to make a list with a component being repeated certain times. To be clear, I have a ScrollView and its own component PutANumber. I need the ScrollView has a predefined amount of…
-
4
votes1
answer39
viewsShould reducing functions be created outside or inside my React component?
Looking at the documentation of hook useReducer, I checked that the reducing function is created out of of the component: const initialState = {count: 0}; function reducer(state, action) { switch…