React Logo

how to get the current date in React JS?

< 1 min readIn ReactJS, you can get the current date using JavaScript’s built-in Date object. Here’s an example of how you can do this: In this example, we’re using the useState hook to manage the state of the current date. We use the useEffect hook to set up an interval that updates the state every second using…

Read More
React Logo

How to empty an array in React JS?

< 1 min readTo empty an array in ReactJS, you can simply reassign the array variable to a new empty array. Here’s how you can do it: In this example, the handleEmptyArray method is called when the button is clicked. Inside this method, this.setState is used to update the state with an empty array, effectively emptying the array….

Read More
NextJs TailwindCSS SCSS

Next.Js boilerplate with TailwindCss and SASS

4 min readIt’s no secret that creating single-page JavaScript applications can be pretty challenging these days. Fortunately, there are multiple frameworks and libraries to choose from. Nextjs is an awesome framework built by Zeit to create Web Applications. It has many great features and advantages, which can make NextJS your first choice for building your next web application. Instead of…

Read More