MIMaksim Ivanovinivanov.hashnode.dev·May 20, 2021 · 1 min readDefining API functionsWhen I'm developing a web application I prefer to abstract the server communication logic into asynchronous functions. Usually I would have an api.(js|ts) module where I would have a function for each endpoint. For example if I want to make a GET req...00
MIMaksim Ivanovinivanov.hashnode.dev·May 20, 2021 · 2 min readHow to type React events with TypeScripthttps://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()...00
MIMaksim Ivanovinivanov.hashnode.dev·Feb 27, 2019 · 3 min readReact Dev ToolsTo 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....00
MIMaksim Ivanovinivanov.hashnode.dev·Feb 26, 2019 · 2 min readJavascript `this`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 ...00
MIMaksim Ivanovinivanov.hashnode.dev·Feb 25, 2019 · 2 min readHandling Events In ReactJSHandling 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 ...00