Tips of day

css

If you have hash links to sections on your page use two following properties in CSS to improve scrolling:

html {
    scroll-behavior: smooth
    scroll-padding: 1em
}

https://www.youtube.com/shorts/hk3RgcBx5Fc

You can change value of CSS variables in JS like this:

CSS:
:root {
  --background: yellow;
}

JS:
document.documentElement.style.setProperty('--background', 'red');

Use Vite to kickstart new React projects:

npm create vite@latest (Choose react framework and typescript swc)
nom run dev