In this example, count is a state variable initialized to 0, and setCount is a function to update count. Each button click increments the count, causing the component to re-render with the updated value.
Basic hooks
useState: Managing component state
useState lets you add and manage state within functional components. Instead of defining state in a class, useState provides a simpler way to declare state variables directly within the component function.
#javascript#reactjs
Last week, I built this set of 50+ inputs with Tailwind CSS and Next.js (link in the comments)! ๐ฅ
Now, I want to expand this into a collection of copy-and-paste components to quickly build app UIs.
Would it be useful? ๐ค
Maintaining consistency is hard
You need to show up daily for the task
If you break the streak it is hard to start again.
Pick a task, do it daily, keep doing it.
#motivation
Integrated llm inside the website builder to perform operations like styling, translation while keeping the workflow inline. Will post more details soon.
This is pretty cool!
It creates a RESTful API around the new SQLite storage inside Durable Objects and gives you a fully working SQLite database that you can interact with over HTTP.
They also cooked with their landing page https://t.co/PAHXSMg4WF