Tag: r

53 votes
7 answers
754 views
Why use AJAX when WebSockets is available?

I've been using WebSockets for a while now, I have chosen to create an Agile project management tool for

avatar
Tuan
0 1 0 9
asked 07 September, 2021
60 votes
12 answers
1.9K views
Debugging WebSocket in Google Chrome

Is there a way, or an extension, that lets me watch the "traffic" going through a WebSocket? For debugging pur

avatar
Vi
0 1 0 9
asked 07 September, 2021
56 votes
12 answers
1.7K views
HTTP headers in Websockets client API

Looks like it's easy to add custom HTTP headers to your websocket client with any HTTP header client whic

avatar
Daniel
0 1 0 9
asked 07 September, 2021
62 votes
4 answers
2.4K views
In what situations would AJAX long/short polling be preferred over HTML5 WebSockets?

I am building a small chat application for friends, but unsure about how to get information in a timely manner

avatar
Georgie
0 1 0 9
asked 07 September, 2021
60 votes
8 answers
1.9K views
Differences between socket.io and websockets

What are the differences between socket.io and websockets in node.js? Are they both server push technologi

avatar
Daniel
0 1 0 9
asked 07 September, 2021
51 votes
6 answers
1.7K views
WebSockets vs. Server-Sent events/EventSource

Both WebSockets and Server-Sent Events are capable of pushing data to browsers. To me they seem to be competin

avatar
Nereida
0 1 0 9
asked 07 September, 2021
55 votes
21 answers
414 views
React Js conditionally applying class attributes

I want to conditionally show and hide this button group depending on what is passed in from the parent compone

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
55 votes
13 answers
1.2K views
Invariant Violation: _registerComponent(...): Target container is not a DOM element

I get this error after a making trivial React example page: Uncaught Error: Invariant Violation: _register

avatar
Luis
0 1 0 9
asked 07 September, 2021
61 votes
16 answers
1.2K views
Setting a backgroundImage With React Inline Styles

I'm trying to access a static image to use within an inline backgroundImage property within React. Unfort

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
52 votes
21 answers
3.1K views
Rerender view on browser resize with React

How can I get React to re-render the view when the browser window is resized? Background I have some blocks

avatar
Dusty
0 1 0 9
asked 07 September, 2021
58 votes
20 answers
858 views
React "after render" code?

I have an app where I need to set the height of an element (lets say "app-content") dynamically. It takes the

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
56 votes
15 answers
1.7K views
useState set method not reflecting change immediately

I am trying to learn hooks and the useState method has made me confused. I am assigning an initial value to a

avatar
Deedee
0 1 0 9
asked 07 September, 2021
66 votes
13 answers
2.4K views
Error Running React Native App From Terminal (iOS)

I am following the tutorial on the official React Native website. Using the following to build my project: r

avatar
Corey
0 1 0 9
asked 07 September, 2021
47 votes
30 answers
2.7K views
Invariant Violation: Objects are not valid as a React child

In my component's render function I have: render() { const items = ['EN', 'IT',

avatar
Suzan
0 1 0 9
asked 07 September, 2021
67 votes
16 answers
1.2K views
React - changing an uncontrolled input

I have a simple react component with the form which I believe to have one controlled input: import React from

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
69 votes
18 answers
551 views
How can I update the parent's state in React?

My structure looks as follows: Component 1 - |- Component 2 - - |- Component 4 - - - |- Component 5

avatar
Stacia
0 1 0 9
asked 07 September, 2021
59 votes
24 answers
770 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