サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ドラクエ3
oida.dev
Published on September 15, 2021 Stefan on Mastodon Reading time: 7 minutes More on TypeScript, React Update April 2022: With the update to React 18, a lot of those problems have been fixed. See this pull request for more details I currently work with a couple of newcomers to React and teach them both TypeScript and React to create apps. It’s fun, and for me who’s been using that for a while now, i
Published on July 21, 2021 Stefan on Mastodon Reading time: 13 minutes More on TypeScript, JavaScript Sometimes when writing TypeScript, some of the things you’d usually do in JavaScript work a little different and cause some weird, and puzzling situations. Sometimes you just want to assign a value to an object property and get a weird error like “Type ‘string | number’ is not assignable to type ‘
Published on July 6, 2021 Stefan on Mastodon Reading time: 10 minutes More on TypeScript, JavaScript The Array.prototype.includes function allows searching for a value within an array. If this value is present, the function returns true! How handy! Of course, TypeScript has proper typings for this JavaScript functionality. However, in certain cases, the typings can bite a little. The reason? It’s
Published on April 13, 2021 Stefan on Mastodon Reading time: 15 minutes More on TypeScript, React If you are creating component libraries and design systems in React, you might already have fowarded Refs to the DOM elements inside your components. This is especially useful if you wrap basic components or leafs in proxy components, but want to use the ref property just like you’re used to: const Bu
Published on July 30, 2020 Stefan on Mastodon Reading time: 10 minutes More on TypeScript, React, Preact Update: React types for version 18 changed a lot! If you encounter problems described in this article, make sure you update to the latest version! In my recent article on TypeScript and React component patterns I’ve stated that I don’t use the built-in type React.FC<> but rather be explicit wit
Published on July 28, 2020 Stefan on Mastodon Reading time: 10 minutes More on TypeScript, React, Preact This list is a collection of component patterns for React when working with TypeScript. See them as an extension to the TypeScript + React Guide that deals with overall concepts and types. This list has been heavily inspired by chantastic’s original React patterns list. Contrary to chantastic’s
Published on June 17, 2020 Stefan on Mastodon Reading time: 7 minutes More on TypeScript Note: Be very careful with this technique. Better checkout my new approach. TypeScript’s predefined types in lib.d.ts are usually very well-typed and give tons of information on how to use built-in functionality as well as providing you with extra-type safety. Until they don’t. Consider the following example w
Published on June 19, 2020 Stefan on Mastodon Reading time: 12 minutes More on TypeScript TypeScript 4.0 is supposed to be released in August 2020, and one of the biggest changes in this release will be variadic tuple types. And even though his feature is hot of the press at the time of this writing, it’s worth checking out and see what we can do with it. Note that stuff here might be subject to c
Published on July 16, 2019 Stefan on Mastodon Reading time: 10 minutes More on TypeScript One way to think about TypeScript is as a thin layer around JavaScript that adds type annotations. Type annotations that make sure you don’t make any mistakes. The TypeScript team worked hard on making sure that type checking also works with regular JavaScript files. TypeScript’s compiler (tsc) as well as lan
Published on September 6, 2019 Stefan on Mastodon Reading time: 4 minutes More on TypeScript, JavaScript If you come from traditional, strongly typed languages you might be familiar with the concept of void: A type telling you that functions and methods return nothing when called. void exists in both JavaScript as an operator and in TypeScript as a primitive type. And in both worlds void works a l
Web apps are really boring if you don’t interact with them. Events are key, and TypeScript’s React typings have great support for them. In this section: Basic Event Handling Restrictive Event Handling Where’s InputEvent? Basic Event Handling # React uses its own event system. That’s why you can’t use typical MouseEvents or similar on your elements. You need to use the specific React version, other
Welcome to this little primer on TypeScript and React! A match made in heaven! Why? JSX is syntactic sugar. Every JSX element you open and pass properties through, is nothing but a function call in React (or Preact or Vue or Dojo… you name it). This gives us one big advantage in TypeScript: JavaScript can be parsed, understood and evaluated. Which means you get all the tooling and compilation bene
Hooks have been announced at React Conf 2018. Check out this page for more details. I think they’re pretty awesome. Probably game-changing! Hooks heave formerly “stateless” functional components to … basically everything traditional class components can be. With a much cleaner API! Just quickly after their release in React 16.7., React typings in DefinitelyTyped got an update as well. Check out ho
Published on April 10, 2014 Stefan on Mastodon Reading time: 4 minutes More on Tools, Sass, Gulp Update 2016/02: This is old. This might not be up to date anymore! Update 2015/03: There has been a breaking change with gulp-ruby-sass v1.0. The files have been updated. Update 2015/12: There have been some updates with gulp-sourcemaps and the way sourcemaps are treated with gulp-ruby-sass. The code s
Published on September 2, 2013 Stefan on Mastodon Reading time: 7 minutes More on Tools, Workflows, Grunt, Yeoman With Effeckt.css I discovered assemble.io, a node-based static site generator for ... well ... assembling HTML files from different parts. A tool like that was much needed by our department once we switched from an inconvenient clutter of Ant builds, PHP includes, CodeKit and command l
このページを最初にブックマークしてみませんか?
『oida.dev | TypeScript, JavaScript, Rust』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く