Skip to content

Instantly share code, notes, and snippets.

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
@anshu-byte
anshu-byte / review-checklist.md
Created November 24, 2023 09:56 — forked from bigsergey/review-checklist.md
Front-end Code Review Checklist

Review checklist

General

  1. Does the code work?
  2. Description of the project status is included.
  3. Code is easily understand.
  4. Code is written following the coding standarts/guidelines (React in our case).
  5. Code is in sync with existing code patterns/technologies.
  6. DRY. Is the same code duplicated more than twice?
@anshu-byte
anshu-byte / DataListComponent.jsx
Last active November 24, 2023 09:47
useMemo, useCallback, useState, and useEffect combined Example
import './App.css';
import React, { useState, useEffect, useMemo, useCallback } from 'react';
// const data = [
// { userId: 1, id: 1, title: 'delectus aut autem', completed: false },
// { userId: 1, id: 3, title: 'fugiat veniam minus', completed: false },
// { userId: 1, id: 4, title: 'et porro tempora', completed: true },
// ];