Skip to content

Instantly share code, notes, and snippets.

View nurmdrafi's full-sized avatar
:octocat:
Focusing

Nur Mohamod Rafi nurmdrafi

:octocat:
Focusing
View GitHub Profile
https://www.youtube.com/watch?v=7exOfIAKuWU&list=LL&index=2&t=35s

 // 1. using default fetch, useEffect, useState

const [data, setData] = useState([]);
const [isLoading, setIsLoading] = useState(true)
useEffect(() => {
	const fetchData = async () => {
		const res = await fetch(url);

responsive navbar

const Navbar = () => {
  const [openMenu, setOpenMenu] = useState(false);
  return (
    <div>
      {/* mobile menu opener icon */}
      <div className="menuIcon">
        <MenuOutlined onClick={() => setOpenMenu(true)} />
      </div>
@nurmdrafi
nurmdrafi / Implementation Context API with (Firebase Authentication, Theme, Main State Management) + useReducer.md
Last active September 22, 2022 15:30
Implementation Context API with (Firebase Authentication, Theme, Main State Management) + useReducer

👾 Auto Close Tag

  • Automatically add HTML/XML close tag

👾 Auto Rename Tag

  • Auto rename paired HTML/XML tag

👾 Brackets Extension Pack

  • 👾 Brackets Keymap: Popular keybindings for VS Code
  • 👾 Live Server: Launch a development local Server with live reload feature for static & dynamic pages
  • 👾 CSS Peek: Allow peeking to css ID and class strings as definitions from html files to respective CSS. Allows peek and goto defination

Scroll To Top Button

import React, { useState } from "react";
import { HashLink } from "react-router-hash-link";
import { BsArrowUp } from "react-icons/bs";

const ScrollToTop = () => {
  const [visible, setVisible] = useState(false);

  const toggleVisible = () => {

🕸 Install Tailwind CSS

  1. install from CDN (before v3 uncustomizable)
  2. install as PostCSS Plugin
  3. Install Tailwind CLI (easy and customizable)
    • node.js required
    • npm init -y (init node project)
    • install Tailwind CSS Intellisense VS Code Plugin
    • npm install -D tailwindcss
  • npx tailwindcss init
  1. node.js required
  2. npm init -y (initialize node project)
  3. install Tailwind CSS Intellisense VS Code Plugin
  4. npx tailwindcss init (create configure files for tailwind)
  5. create src/input.css or any name
@tailwind base;
@tailwind components;
@tailwind utilities;