Skip to main content

All Questions

Tagged with or
2567 votes
72 answers
3.5m views

I created the default IntelliJ IDEA React project and got this: Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (...
a1cd's user avatar
  • 25.8k
2375 votes
51 answers
1.8m views

With React Router, I can use the Link element to create links which are natively handled by React Router. I see internally it calls this.context.transitionTo(...). I want to do navigation. Not from a ...
George Mauer's user avatar
2099 votes
88 answers
2.2m views

I'm trying to do something like the following in React JSX (where ObjectRow is a separate component): <tbody> for (var i=0; i < numrows; i++) { <ObjectRow/> } </...
B Robster's user avatar
  • 42.2k
1499 votes
21 answers
661k views

What does the ... do in this React (using JSX) code and what is it called? <Modal {...this.props} title='Modal heading' animation={false}>
Thomas Johansen's user avatar
1465 votes
33 answers
1.0m views

I'm trying to find the proper way to define some components which could be used in a generic way: <Parent> <Child value="1"> <Child value="2"> </Parent> There is a logic ...
plus-'s user avatar
  • 46.7k
1306 votes
63 answers
916k views

I'm using React-router and it works fine while I'm clicking on link buttons, but when I refresh my webpage it does not load what I want. For instance, I am in localhost/joblist and everything is fine ...
DavidDev's user avatar
  • 13.4k
1136 votes
24 answers
1.7m views

I have an external (to the component), observable object that I want to listen for changes on. When the object is updated it emits change events, and then I want to rerender the component when any ...
Philip Walton's user avatar
1124 votes
8 answers
283k views

I've read this answer, reducing boilerplate, looked at few GitHub examples and even tried redux a little bit (todo apps). As I understand, official redux doc motivations provide pros comparing to ...
VB_'s user avatar
  • 45.9k
1103 votes
15 answers
439k views

I have just started learning React, and Facebook helps in simplifying the initial setup by providing the following ready-made project. If I have to install the skeleton project I have to type npx ...
Paresh Maniyar's user avatar
1097 votes
29 answers
786k views

Is there a way to only add attributes to a React component if a certain condition is met? I'm supposed to add required and readOnly attributes to form elements based on an Ajax call after render, but ...
Remi Sture's user avatar
  • 13.1k
1095 votes
32 answers
1.4m views

I'm building a React component that accepts a JSON data source and creates a sortable table. Each of the dynamic data rows has a unique key assigned to it but I'm still getting an error of: Each ...
Brett DeWoody's user avatar
995 votes
28 answers
1.2m views

What's the react way of setting focus on a particular text field after the component is rendered? Documentation seems to suggest using refs, e.g: Set ref="nameInput" on my input field in the render ...
Dave's user avatar
  • 11.9k
976 votes
24 answers
891k views

I have two components: Parent component Child component I was trying to call Child's method from Parent, I tried this way but couldn't get a result: class Parent extends Component { render() { ...
N8FURY's user avatar
  • 10.1k
937 votes
57 answers
1.0m views

I'm looking for a way to detect if a click event happened outside of a component, as described in this article. jQuery closest() is used to see if the target from a click event has the dom element as ...
Thijs Koerselman's user avatar
927 votes
38 answers
916k views

I want to read the onClick event value properties. But when I click on it, I see something like this on the console: SyntheticMouseEvent {dispatchConfig: Object, dispatchMarker: ".1.1.0.2.0.0:1", ...
user1924375's user avatar
  • 10.9k

15 30 50 per page
1
2 3 4 5
31799