← All notes

#javascript

9 notes

Next.js

Create Project bash npx create-next-app@latest my-app --ts --eslint --src-dir --import-alias '@/' --use-[npm|pnpm|yarn] --yes

#javascript

[Not Finished] Setup Storybook with Vitest in a project created by Next.js

Initialize storybook with a command: bash pnpm create storybook@latest After finishing setup & config, install vitest and

#storybook #nextjs #typescript #javascript #test #vitest

Running Storybook Stories contains Hooks of Next.js

I created a storybook story contains UI components which used useNavigation from Next.js inside. When I run storybook instance, it display error page instead: …

#javascript #storybook #react

React

- next-js - react-intersection-observer

#javascript #framework

Fixing "husky" can not run git hooks (node installed by "nvm")

Part of dotfiles Add file ~/.config/husky/init.sh bash export NVMDIR="$HOME/.nvm" [ -s "$NVMDIR/nvm.sh" ] && \. "$NVMDIR/nvm.sh"

#javascript #tools #husky #git #dotfiles

Infinite Scroll Company Logo Carousel (Using CSS Only)

First, Create the two container like this html <div id='container'> <div id='img-wrapper'> <!-- content --> </div> </div> And insert the logos html <…

#javascript

Intersection Observer in React

Mostly, I use IntersectionObserver to check whether the element is in the viewpoint (the view which is currently display on the browser) jsx import { useE…

#javascript

Barcode & QR Code Libraries in JS

- [qrcode](https://www.npmjs.com/package/qrcode) - [jsbarcode](https://github.com/lindell/JsBarcode)

#javascript #tools

CSS vars to TS vars

Code following make javascript and Typescript file declaration to store design tokens callable in Frontend Project Code generated by ChatGPT. I didn't check …

#javascript #typescript #css #frontend