Skip to content

Instantly share code, notes, and snippets.

@waterswv
Last active November 19, 2019 05:44
Show Gist options
  • Save waterswv/d5b4cf619aa6db91c2486ff8bb489426 to your computer and use it in GitHub Desktop.
Save waterswv/d5b4cf619aa6db91c2486ff8bb489426 to your computer and use it in GitHub Desktop.
Today I...

Today I learned about...

  1. Did a refresher on Memoization
  2. Did a refresher on Server-Side-Rendering Importance
  3. Setup and installed TailwindCSS with NextJS

Detailed descriptions below

Things I'm curious about today:

  1. useMemo in React
  2. SPA design patterns; specifically Angular & React
  3. Breakpoints for sites
  4. Identifying patterns for solving algorithms

Memoization

General Overview

  1. From Wikipedia:

In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and returning the cached result when the same inputs occur again. Memoization has also been used in other contexts (and for purposes other than speed gains), such as in simple mutually recursive descent parsing.

  1. Common strategy for dynamic programming problems
  2. Has 2 main approaches
  • => Recursive strategy has O(n) time, and O(n) space as the callstack gets built up.
  • => Bottom-up computation; has O(n) time as well, but O(1) space as you compute the smallest item 1st.

SSR | Server-Side-Rendering

Major Benefits

  1. Faster time to paint as HTML rendered on server
  • => i.e. Users can start reading pages quicker as they don't need to wait for Javascript to download or library like React to load
  1. More consistent SEO benefit for page indexing | Detail on Benefit

Reference Article

TailwindCSS

Overview

TailwindCSS is a utility directed CSS framework that provides specialized classes that you can use to build and modify components. Instead of defining all components, strong opinions like Bootstrap/react-bootstrap, tailwind provides all the utilities to build your own version of Bootsrap, etc. It requires more up front lifting but creates flexibility that is then achieved by you designing to your needs instead of hacking around the framework.

@waterswv
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment