Tag: r

56 votes
10 answers
2.8K views
Difference between npx and npm?

I have just started learning React, and Facebook helps in simplifying the initial setup by providing the follo

avatar
Freida
0 1 0 9
asked 07 September, 2021
59 votes
28 answers
3K views
How to set focus on an input field after rendering?

What's the react way of setting focus on a particular text field after the component is rendered? Docume

avatar
Chaya
0 1 0 9
asked 07 September, 2021
59 votes
17 answers
2.2K views
How do I conditionally add attributes to React components?

Is there a way to only add attributes to a React component if a certain condition is met? I'm supposed to

avatar
Dario
0 1 0 9
asked 07 September, 2021
60 votes
30 answers
2.6K views
React js onClick can't pass value to method

I want to read the onClick event value properties. But when I click on it, I see something like this on the co

avatar
Daniel
0 1 0 9
asked 07 September, 2021
68 votes
11 answers
822 views
Why do we need middleware for async flow in Redux?

According to the docs, "Without middleware, Redux store only supports synchronous data flow". I don't und

avatar
Mikki
0 1 0 9
asked 07 September, 2021
51 votes
19 answers
689 views
Understanding unique keys for array children in React.js

I'm building a React component that accepts a JSON data source and creates a sortable table. Each of the

avatar
Wei
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
61 votes
30 answers
2.1K views
React-router urls don't work when refreshing or writing manually

I'm using React-router and it works fine while I'm clicking on link buttons, but when I refresh my w

avatar
Robyn
0 1 0 9
asked 07 September, 2021
62 votes
28 answers
2.7K views
How to pass props to {this.props.children}

I'm trying to find the proper way to define some components which could be used in a generic way: <Pa

avatar
Robyn
0 1 0 9
asked 07 September, 2021
59 votes
17 answers
907 views
What does the three dots notation do in Javascript?

What does the ... do in this React (using JSX) code and what is it called? <Modal {...this.props} title=&a

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
1K views
Loop inside React JSX

I'm trying to do something like the following in React JSX (where ObjectRow is a separate component): <

avatar
Forrest
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
61 votes
21 answers
2.3K views
Multiline strings in VB.NET

Is there a way to have multiline strings in VB.NET like Python a = """ multi line string """ or PHP? $a =

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
64 votes
4 answers
2.1K views
Why C# fails to compare two object types with each other but VB doesn&apos;t?

I have two objects in C# and don't know if it's Boolean or any other type. However when I try to com

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
54 votes
12 answers
1.4K views
Is String.Format as efficient as StringBuilder

Suppose I have a stringbuilder in C# that does this: StringBuilder sb = new StringBuilder(); string cat = "ca

avatar
Shanita
0 1 0 9
asked 07 September, 2021
54 votes
13 answers
2.8K views
.NET Configuration (app.config/web.config/settings.settings)

I have a .NET application which has different configuration files for Debug and Release builds. E.g. the debug

avatar
Fabian
0 1 0 9
asked 07 September, 2021
54 votes
7 answers
3.1K views
How to loop through all the properties of a class?

I have a class. Public Class Foo Private _Name As String Public Property Name() As String Get

avatar
Winford
0 1 0 9
asked 07 September, 2021
63 votes
12 answers
3K views
ObservableCollection Doesn&apos;t support AddRange method, so I get notified for each item added, besides what about INotifyCollectionChanging?

I want to be able to add a range and get updated for the entire bulk. I also want to be able to cancel the ac

avatar
Charis
0 1 0 9
asked 07 September, 2021
56 votes
12 answers
791 views
Check if a string contains an element from a list (of strings)

For the following block of code: For I = 0 To listOfStrings.Count - 1 If myString.Contains(lstOfStrings.I

avatar
Dorinda
0 1 0 9
asked 07 September, 2021