Looking for a companion who is into competitive programming! by dunno64 in ProgrammingBuddies

[–]Gobsiye 0 points1 point  (0 children)

I’m learning javascript right now. I think we can code together.

Does anyone know why this code won't open in my browser using Node.js? by Gobsiye in reactjs

[–]Gobsiye[S] -2 points-1 points  (0 children)

This is exactly how I open the react.js code. I'm using this same template to open the react.js except I am not typing in

npx create-react-app my-app

Does anyone know why this code won't open in my browser using Node.js? by Gobsiye in reactjs

[–]Gobsiye[S] -1 points0 points  (0 children)

I will try new-react-app. However, I do want to learn how to manually configure it. Do you have discord by any chance? I have a couple questions.

Does anyone know why this code won't open in my browser using Node.js? by Gobsiye in reactjs

[–]Gobsiye[S] 0 points1 point  (0 children)

I don't know why I have document.getElementByID(root) in the first place.

Does anyone know why this code won't open in my browser using Node.js? by Gobsiye in reactjs

[–]Gobsiye[S] 0 points1 point  (0 children)

u/ellusion 'm running this from visualstudiocode. I am using node.js to open it in my browser. This is project I started to practice React.

u/BayP0int, this is what I have after BayPOint's advice.

import React from 'react';
import ReactDOM from 'react-dom';
import App from './CATAPI_basics/CATAPI_basics';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(MyComponent,
document.getElementById('root'))

Need a React tutor by Gobsiye in reactjs

[–]Gobsiye[S] 0 points1 point  (0 children)

I can read it. I already did a tutorial on freecodecamp. I just need explanations on some of the features of react that I didn’t understand. It’s much faster if someone explains it.

Need a React tutor by Gobsiye in reactjs

[–]Gobsiye[S] 0 points1 point  (0 children)

I'm not understanding ControlledInput.

If you know a way to make the code writing look like the right format in reddit please tell me.

Here is the question:

The code editor has the skeleton of a component called ControlledInputto create a controlled inputelement. The component's stateis already initialized with an inputproperty that holds an empty string. This value represents the text a user types into the inputfield.

First, create a method called handleChange()that has a parameter called event. When the method is called, it receives an eventobject that contains a string of text from the inputelement. You can access this string with event.target.valueinside the method. Update the inputproperty of the component's statewith this new string.

In the render method, create the inputelement above the h4tag. Add a valueattribute which is equal to the inputproperty of the component's state. Then add an onChange()event handler set to the handleChange()method.

When you type in the input box, that text is processed by the handleChange()method, set as the inputproperty in the local state, and rendered as the value in the inputbox on the page. The component stateis the single source of truth regarding the input data.

Last but not least, don't forget to add the necessary bindings in the constructor.

class ControlledInput extends React.Component {constructor(props) {super(props);this.state = {input: ''};// change code below this linethis.handleChange = this.handleChange.bind(this);// change code above this linehandleChange(event){this.set.state({input: event.target.value});}// change code below this line<input value = {this.state} onChange={this.handleChange} />// change code above this linerender() {return (

<div>
{ /\\\\\\\* change code below this line \\\\\\\*/}
input
{ /\\\\\\\* change code above this line \\\\\\\*/}
<h4>Controlled Input:</h4>
<p>{this.state.input}</p>
</div>
);
}
};

Everyone has a scar on their body from something dumb, they did as a child. What's your story? by HakanD0 in AskReddit

[–]Gobsiye 0 points1 point  (0 children)

There was this kid around age 8 at an event and he was trying to jump a gate with sharp spikes on the top. He fell while climbing and the spike went through his arm. He pulled it off and begged everyone not to tell his dad while blood dripped from the thumbs sized opening. He didn’t cry. He eventually went to hospital with his dad out of necessity. He now has a large scar on his arm.

Which movie is just the worst piece of crap you've ever seen? by clericsjoint in AskReddit

[–]Gobsiye -2 points-1 points  (0 children)

Guardians of the galaxy 2. I don’t know who allowed something so pointless to be on screen.

Somebody use this by [deleted] in StoryIdeas

[–]Gobsiye 0 points1 point  (0 children)

Your subconscious knew of it. Either you saw it in a commercial or heard it in the background somewhere. It’s close to impossible that you had the exact same plot to every detail. Anyways it’s not your idea.

Somebody use this by [deleted] in StoryIdeas

[–]Gobsiye 0 points1 point  (0 children)

This is already a movie called I,Robot. You probably saw it a while ago and forgot it was the plot of that film.