Defining API functions
Abstracting server communication in frontend applications
Search for a command to run...
Abstracting server communication in frontend applications
https://youtu.be/3PtiSy8G-Cs Sometimes when you write React and TypeScript code, you have to define event handlers. How do you choose the correct event type for them? Let's say we have an onChange event handler called handleTextChange: function App()...
To develop React applications effectively - you’ll need to use React DevTools browser extension. It’s available for both Chrome and Firefox. It has two main features: view of a component tree and the current state and props of the selected component....
A lot of people find this keyword in Javascript very confusing. Depending on where is it used and defined it can have different value. This In Functions In normal Javascript functions this refers to global object. It will be window object in browser ...
Handling events in ReactJS is very similar to how it’s done on DOM elements. There are a few differences though. Event names are camelCased, so instead of onclick you have to use onClick: <button onclick="toggleDropdown()">Categories</button> // DOM ...
In ReactJS props is how components get data from their parent. When you add a tag to your JSX code and pass it some attributes - the components referenced by this tag will receive them as a props object. <UserCard name="Maksim" surname="Ivanov" /> In...
HTML entities are strigns inside HTML code that start with ampersand & and end with semicolon ;. They allow you to add wide variety of characters to your HTML code. For example < and > characters are reserved in HTML because they are used to enclose ...
Here is a thing, in Typescript there is a shorthand to create and assign class properties from constructor params. Imagine you have following code, let’s say you have class User: class User { private name: string; private surname: string; priva...
Introduction to ReactJS Components. What Is Component A component is an isolated piece of interface. It contains some piece of layout describing what should appear on the screen. It can also have some bound state and contain some business logic. Ther...