July 12, 2021Comments are off for this post.

Hudson Views from atop Inwood

July 12, 2021Comments are off for this post.

Untitled

July 12, 2021Comments are off for this post.

Alone at Fort Tryon

July 12, 2021Comments are off for this post.

Storm Imminent

July 12, 2021Comments are off for this post.

Texas Bound

July 12, 2021Comments are off for this post.

Why Google’s bookmark manager and Docs have purposefully bad UI

From Dave Lynam's post on the Bookmark OS blog:

Google’s core business is still search. By neglecting UI and design for these products, Google corals user behavior into a “search-first” mentality. The more disorganized you become, the more reliant you become on search, and Google benefits.

I’ve often heard people say they no longer use bookmarks any more and just rely on search. I wonder if that truly is the most practical solution for them or if it is the result of a self-serving dark pattern from Google.

Makes you wonder, doesn't it?

May 19, 2021Comments are off for this post.

FOUC fix for next.js apps

Next.js is super duper dope. Versatile. Fast. Easy to understand and a dead-simple configuration. What's not to love? Out-of-the-box, it seems to just work. Pair it with GraphQL and it's game over. Nothing seems to compare so far in my testing.

My one problem so far, has been FOUC with styled-components. Truly a horrible issue. However, thanks to this bloke, there's an easy solution.

First create a _document.js file in your pages directory. Assuming you are working with styled-components, drop this in there:

import Document from "next/document";
import { ServerStyleSheet } from "styled-components";
export default class MyDocument extends Document {
  static async getInitialProps(ctx) {
    const sheet = new ServerStyleSheet();
    const originalRenderPage = ctx.renderPage;
    try {
      ctx.renderPage = () =>
        originalRenderPage({
          enhanceApp: (App) => (props) =>
            sheet.collectStyles(<App {...props} />),
        });
      const initialProps = await Document.getInitialProps(ctx);
      return {
        ...initialProps,
        styles: (
          <>
            {initialProps.styles}
            {sheet.getStyleElement()}
          </>
        ),
      };
    } finally {
      sheet.seal();
    }
  }
}

That's literally it! Rebuild your app, and serve and he FOUC issue should be resolved!

May 17, 2021Comments are off for this post.

Afternoon shadows

May 17, 2021Comments are off for this post.

Rooms for rent

May 17, 2021Comments are off for this post.

Citgo Gas