2021-04-13
1082
#react
Jefferson Ighalo
42015
Apr 13, 2021 â‹… 3 min read

Using react-responsive to implement responsive design

Jefferson Ighalo I stand at the intersection of beautiful design, secure frontend applications, and fintech at scale. Lover of JavaScript; flirting with Java, Go, and Swift.

Recent posts:

Rust logo over black marble background.

Handling memory leaks in Rust

Learn how to manage memory leaks in Rust, avoid unsafe behavior, and use tools like weak references to ensure efficient programs.

Ukeje Goodness
Nov 20, 2024 â‹… 4 min read
Robot pretending to be a person.

Using curl-impersonate in Node.js to avoid blocks

Bypass anti-bot measures in Node.js with curl-impersonate. Learn how it mimics browsers to overcome bot detection for web scraping.

Antonello Zanini
Nov 20, 2024 â‹… 13 min read
Solving Eventual Consistency In Frontend

Solving eventual consistency in frontend

Handle frontend data discrepancies with eventual consistency using WebSockets, Docker Compose, and practical code examples.

Kayode Adeniyi
Nov 19, 2024 â‹… 6 min read
How To Use Lazy Initialization Pattern With Rust 1.80

How to use the lazy initialization pattern with Rust 1.80

Efficient initializing is crucial to smooth-running websites. One way to optimize that process is through lazy initialization in Rust 1.80.

Yashodhan Joshi
Nov 18, 2024 â‹… 5 min read
View all posts

One Reply to "Using react-responsive to implement responsive design"

  1. Good article. However, this doesn’t adhere to the principle of DRY (Do not Repeat Yourself). Creating a separate component for each viewport is far from ideal and doesn’t scale well. Consider using only one component and one stylesheet that contains each viewport’s styles nested under the corresponding media query. The mobile styles should be applied first and progressively overwritten by the styles for larger viewports because those devices are typically more powerful. If it’s very important for you not to load unnecessary styles then you can dynamically import the correct stylesheet based on the viewport into one component.

Leave a Reply