IT

 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 

 

 






 







 


IT

 

 

AI  

 

 






 







 


 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 






 







 


 

Web  

 

 

PlayStation  

 

YouTuber  

 





 

 





 

 

 












TypeScript + React: Children types are broken  

3users  
fettblog.eu  


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. Its fun, and for me whos been using that for a while now, i



 

2021/09/24 14:22
 







 

















TypeScript: Unexpected intersections  

3users  
fettblog.eu  


Published on July 21, 2021 Stefan on Mastodon Reading time: 13 minutes More on TypeScript, JavaScript Sometimes when writing TypeScript, some of the things youd 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 



 

2021/07/26 19:27
 





 











TypeScript: Array.includes on narrow types  

5users  
fettblog.eu  


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? Its



 

2021/07/19 20:33
 



 











TypeScript + React: Typing Generic forwardRefs  

50users  
fettblog.eu  


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 youre used to: const Bu



 

2021/04/23 20:48
 







 











TypeScript: Low maintenance types  

5users  
fettblog.eu  


Published on January 20, 2021 Stefan on Mastodon Reading time: 12 minutes More on TypeScript I write a lot about TypeScript and I enjoy the benefits it gives me in my daily work a lot. But I have a confession to make, I dont really like writing types or type annotations. Im really happy that TypeScript can infer so much out of my usage when writing regular JavaScript so Im not bothered writing



 

2021/01/22 06:52
 





 











Tidy TypeScript: Prefer union types over enums  

3users  
fettblog.eu  


Published on November 19, 2020 Stefan on Mastodon Reading time: 8 minutes More on TypeScript, JavaScript, Tidy Typescript This is the first article in a series of articles where I want to highlight ways on how to keep your TypeScript code neat and tidy. This series is heavily opinionated, so dont be angry if I ditch a feature that you learned to like. Its not personal. Today we look at enums. En



 

2021/01/18 08:51
 



 











Tidy TypeScript: Name your generics  

4users  
fettblog.eu  


Published on January 7, 2021 Stefan on Mastodon Reading time: 6 minutes More on TypeScript, JavaScript, Tidy Typescript My book TypeScript in 50 Lessons features interludes. Short texts on TypeScript culture that provide room to breathe between heavy, technical tutorials. One of those interludes gives some opinionated advice on how to name generic variables. I want to recap this text piece and ela



 

2021/01/18 08:51
 





 











TypeScript: Union to intersection type  

5users  
fettblog.eu  


Published on June 29, 2020 Stefan on Mastodon Reading time: 17 minutes More on TypeScript Recently, I had to convert a union type into an intersection type. Working on a helper type UnionToIntersection<T> has taught me a ton of things on conditional types and strict function types, which I want to share with you. I really like working with non-discriminated union types when I try to model a type w



 

2020/10/26 15:51
 



 











TypeScript + React: Why I don't use React.FC  

6users  
fettblog.eu  


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 Ive stated that I dont use the built-in type React.FC<> but rather be explicit wit



 

2020/08/06 15:06
 





 











TypeScript + React: Component patterns  

339 users  
fettblog.eu  


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 chantastics original React patterns list. Contrary to chantastics



 

2020/07/30 09:19
 













 











TypeScript: Improving Object.keys  

5users  
fettblog.eu  


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. TypeScripts 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 dont. Consider the following example w



 

2020/06/30 09:40
 







 











TypeScript: Variadic Tuple Types Preview  

6users  
fettblog.eu  


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, its worth checking out and see what we can do with it. Note that stuff here might be subject to c



 

2020/06/26 00:41
 





 











TypeScript without TypeScript -- JSDoc superpowers  

26users  
fettblog.eu  


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 dont make any mistakes. The TypeScript team worked hard on making sure that type checking also works with regular JavaScript files. TypeScripts compiler (tsc) as well as lan



 

2019/12/31 20:27
 

















 











void in JavaScript and TypeScript  

10users  
fettblog.eu  


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



 

2019/09/10 11:39
 











 











TypeScript and React: Events  

3users  
fettblog.eu  


Web apps are really boring if you dont interact with them. Events are key, and TypeScripts React typings have great support for them. In this section: Basic Event Handling Restrictive Event Handling Wheres InputEvent? Basic Event Handling # React uses its own event system. Thats why you cant use typical MouseEvents or similar on your elements. You need to use the specific React version, other



 

2019/09/05 01:00
 



 











TypeScript and React  

4users  
fettblog.eu  


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




 

2019/08/06 18:45
 









 











TypeScript and React: Hooks  

11users  
fettblog.eu  


Hooks have been announced at React Conf 2018. Check out this page for more details. I think theyre 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




 

2018/12/22 15:45
 







 











Gulp: Creating multiple bundles with Browserify  

13users  
fettblog.eu  


Published on March 25, 2015 Stefan on Mastodon Reading time: 8 minutes More on Gulp, Browserify, Tools With the ever-changing eco system of Node.js tools, a short version disclaimer. This article has been created using Gulp v3.8 Browserify Glob 5.0 Event Stream 3.3 Vinyl Source Stream 1.1 If something does not work when youre using the same tutorial, please check if theres been a major update ca



 

2015/05/08 17:42
 





















Gulp, Sass, Autoprefixer, Sourcemaps!  

4users  
fettblog.eu  


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



 

2014/05/09 06:48
 



 











Using assemble.io with yeoman.io's webapp Gruntfile  

3users  
fettblog.eu  


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



 

2013/11/21 16:19
 





































 

fettblog.eu | TypeScript, JavaScript, Rust  

 



j

k

l

e

o
 
 
















 









 

















 









 









 







Pro



 




 






App Storeからダウンロード
Google Playで手に入れよう


Copyright © 2005-2024 Hatena. All Rights Reserved.
 





x