MMagnusinmagnus.hashnode.dev·Aug 24, 2023 · 3 min readWhat is promise?explain promise in javscript to a layman ChatGPT Sure, imagine you ordered a pizza from a restaurant, but you have to wait for it to be made and delivered. The waiter gives you a little buzzer and tells you, "When your pizza is ready, this buzzer wil...00
MMagnusinmagnus.hashnode.dev·Feb 16, 2022 · 1 min readWrite a Simple Counter in ReactJS.class Counter extends React.Component { constructor(props) { super(props); this.state = { count: 0 }; // Change code below this line this.increment=this.increment.bind(this); this.decrement=this.decrement.bind(this); this.rese...00
MMagnusinmagnus.hashnode.dev·Feb 15, 2022 · 2 min readBind 'this' to a Class MethodIn addition to setting and updating state, you can also define methods for your component class. A class method typically needs to use the this keyword so it can access properties on the class (such as state and props) inside the scope of the method....00
MMagnusinmagnus.hashnode.dev·Feb 14, 2022 · 1 min readHow to understand difficult concepts in a programming language?Suppose you are learning english and you donot know the meaning of the word.What you do? You first search the meaning in the dictionary and then see the sentences with that word to understand the meaning better.In the same way to understand the progr...00
MMagnusinmagnus.hashnode.dev·Feb 14, 2022 · 1 min readSet State with this.setStatethis.setState({ username: 'Lewis' });00