Breakpoint - Issue 1 The First Issue
Hey folks,
It’s the first issue of Breakpoint newsletter. Every week at 10 am on Tuesday in Vancouver time, I would share some of the articles, blog posts, videos, or podcasts I’ve consumed about frontend world and some of my thoughts about those. These could be news, tutorials, or new trend that is happening. Hopefully these can also help you keep yourself on top of frontend as well!
Frontend Shares
Making the Case for Signals in JavaScript by Ryan Carniato (10 mins)
Recently there have been a lot of talks about reactivity or using Signals to manage states in application. With Signals and the removal of VirtualDOM, your components don’t need to re-render if one state changes but only the affected part of HTML. This changes the way we organize our components and personally it also removes the uncertainty of how and when to apply performance techniques in React like useMemo
and such. Many other frameworks have started doing it or moving to this direction.
Optimization on React Beta Doc by Dan Abramov (8 mins)
This might be old but the performance optimization techniques done here are still valid. The takeaway here is to always try to load just enough for initial load and lazy load the rest. It sounds easy but can be overlooked.
Container queries land in stable browsers by Una Kravets (3 mins)
We always use media query to build responsible website and now we have another tool called container query. Media query defines how this component should look like respective to window size while container query is to this component size.
Bye, React Native. Hello Native! by Santhosh Nageshwar (6 mins)
This is technically not frontend but it does have the word React. There were some blog posts from Airbnb about how they decided to transition from React Native to native like Kotlin and Swift. This is another one from Intuit. It makes me wonder if choosing React Native or other cross-platform framework has a cut-off point in terms of time and scalability before considering using native again.
A Rust-based web bundler. It seems it tries to replace Webpack but still compatible with Webpack. Maybe worth a look if your team is mostly on Webpack and would like to have faster development time and build time.
Interview Question
I’ll share questions that I’ve heard being asked before so maybe it can be an entry point for you to practice.
An image is represented by an m x n
integer grid image
where image[i][j]
represents the pixel value of the image.
You are also given three integers sr
, sc
, and color
. You should perform a flood fill on the image starting from the pixel image[sr][sc]
.
To perform a flood fill, consider the starting pixel, plus any pixels connected 4-directionally to the starting pixel of the same color as the starting pixel, plus any pixels connected 4-directionally to those pixels (also with the same color), and so on. Replace the color of all of the aforementioned pixels with color
.
Return the modified image after performing the flood fill.