AAAnıl Anarinanilanar.hashnode.dev·Aug 5, 2021 · 1 min readVSCode: How to infer function return types in TypescriptTL;DR You don't need an extension. You don't need a plugin. You don't need a library. It's a built-in feature! Just press Cmd + . or Ctrl + . when your cursor is placed just before the opening paranthesis of function arguments. function foo(a: stri...00
AAAnıl Anarinanilanar.hashnode.dev·Aug 4, 2021 · 2 min readHow to generate unique html ids in ReactEdit: I noticed that this approach doesn't work for server-side rendering due to randomness. To solve that issue, React released useId in v18. TL;DR v2 I published this work. See anilanar/idhook. TL;DR v1 npm install nanoid and then use this hook: i...00
AAAnıl Anarinanilanar.hashnode.dev·Jul 24, 2021 · 1 min readMy journey to nix flakes, part 2You can access part 1 here. If you check the home-manager repo for instructions, it looks quite simple. The first step is to add home-manager to inputs: inputs = { home-manager.url = "github:nix-community/home-manager"; }; followed up by adding th...00
AAAnıl Anarinanilanar.hashnode.dev·Jul 21, 2021 · 4 min readMy journey to nix flakes, part 1I've been a NixOS user, which is installed on my desktop PC, for more than a year. Since then, I've rarely touched my company Macbook. Over time, the Macbook detoriated and I'm not able to use it for development anymore. Soon, I'll go on a long vacat...00