Skip to content

Light2Dark/react-hooks

Repository files navigation

This is a Next.js project bootstrapped with create-next-app. Huge thanks to Theo and his cool team for providing a boilerplate for me yay! (eventhough Im not really utilizing Next here haha)

Intro

This is a react-hooks website + tailwind css combo I worked on. I did not mean this to be instructional content but if you'd like to learn about

  • React Hooks

  • Typescript & React

check this out!

Visit the website at Electro

Or if you're cloning this repo:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Learn More

If you wanna learn about these hooks, I've attached resources to each hook and the challenges for you which I did in this website:

  • Challenge: Build a counter that you can increment and decrement with buttons
  • Challenge: Build a stopwatch with "Start", "Stop" and "Reset" buttons
  • Challenge: Fetch some data from some website somewhere (axios is friend) and display it. Have a button which changes the data / renews it.
  • Challenge: 1) Have a counter for the number of times you click a button OR 2) Enter a name and click a button which puts that name in another div somewhere.
  • Challenge: Build a light/dark mode toggle using useContext to get values down various components
  • useMemo Hook is to optimize performance for existing functions so I have not used it but it's very simple to learn.
  • a memoized function / calculation means that the result of function is cached so that repeated function calls are not expensive in performance
  • useCallback hooks returns a memoized callback.

About

next + ts + new tech

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published