Today I Learned

Next Js: Absolute Imports and Module path aliases

// tsconfig.json or jsconfig.json
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/components/*": ["components/*"]
    }
  }
}

AosJs: AosJs

Laravel: Manage Subdomains in Laravel

Next JS: Image placeholders

<Image src="/firsrt-image.svg" width={120} height={120} blurDataURL="/image-blur.svg" placeholder="blur" />

See detail here!

JavaScript: Lazy-loading with Intersection Observer API

See detail here!

CSS: ::before & ::after

  • ::before
    h1::before {
    content: "this is before";
    }
    
  • ::after
    h1::after {
    content: "thus is after";
    }
    

VIM: The power of HJKL

  • H: left
  • J: bottom
  • K: top
  • L: right

Next JS: Image Component and Image Optimization

// import Image component
import Image from 'next/image'

// use Image component
<Image src="randomImageURL" alt="Image" width={100} height={100} priority />

See Detail here!