DEV Community

ZhiHong Chua
ZhiHong Chua

Posted on • Edited on

Week 14: Momentum

I don't know if I've been more hardworking after returning from holidays, or it so happened that the weeks of studying bits and pieces finally came together last week... I've finished some milestones in studying!

  1. JS Quiz - completed all high priority questions
  2. JS Coding - completed all relevant questions
  3. Behavioural - practiced speaking

System Design and Leetcode remains a little unstable, but I think we are getting better! This week will mostly focus on recap.

1. JS Quiz

  • MON - (15/63 revised) box-sizing, display, React, event loop, hoisting, event delegation, this
    • mistakes: box-sizing measures? position: relative means? What's this?
  • TUE - (42/63 revised) closure, constructors, cookies, Virtual DOM.
    • mistakes: CSS selectors? translate() vs absolute position? Event bubbling? Z-index?
  • WED - 63 revised! What shall I explore tomorrow? Perhaps spend more time on weaker areas (Leetcode / JS Coding).
    • mistakes: HTTP Cache Headers?
  • THU - Gemini-generated list of 15+ questions. Like useLayoutEffect vs useEffect, or Error Boundary.
    • Strict Mode - wrap the root of app with this. Runs twice the ref / effects, to detect if forgot to cleanup.
    • Controlled vs Uncontrolled Components is mainly difference in form state; whether use form.submit() or setData. Really is just up to preference...?

2. Behaviour

  • MON - spoke 3!
  • TWO - spoke 2! Speak on phone seems to work smoother
  • WED - spoke 3! But could tighten answer
  • THU - done 3

3. Leetcode

4. JS Coding

  • MON - revised Squash Object, still have issues with Map Async Limit
  • TUE - * DOM API, State Management, Security, Event Loop, HTTP Error Codes
  • WED - Event Emitter and useDebounce. This gets boring... where find new questions? 👀
  • SAT - QRT Sample JS Coding Quiz had two questions: (1) Write a class that extends an EventEmitter for a search API, and (2) React useState list view page
    • the latter had a tiny gotcha, which is you need to destructure or shallow copy the previous state of articles list, ensuring you're not mutating state directly. React may not re-render if the same array reference is reused, even if its contents are changed via .sort().
  • SAT - Session 2 of QRT Test. Things I learnt:
    • height: 100% doesn't work with display: flex. Need to use align-items: stretch
    • fetch API's response needs to be parsed with response.json()
    • CSS with spacebar just means 2 different class names
    • text-decoration helps with underline

5. System Design

  • MON - design airlines flight staff assignment dashboard
  • TUE - * find errors in TodoList / Polling-Cancel code
  • WED - Study 2 concepts: Critical Rendering Path Optimization, State Hydration and Partial Hydration
    • minification for quicker load (but that's handled by Webpack usually).
    • Astro for SSR / hydration

Top comments (0)