22 Aug

Testing Made Easier Via Framework Minimalism And Software Architecture

Like many other Android developers, my initial foray into testing on the platform lead me to be immediately confronted with a demoralizing degree of jargon. Further, what few examples I came across at the time (circa 2015) did not present practical use cases which may have inclined me to think that the cost to benefit ratio of learning a tool like Espresso in order to verify that a TextView.setText(…) was working properly, was a reasonable investment.

21 Aug

Adding an Emoji Status to Terminal (ZSH)

This post is inspired and credited in large part to @yechielk . He posted this tweet last night and I, like everyone else, also wanted to add emojis that reacted to the success of my commands!

Ye...

21 Aug

Using requestAnimationFrame with React Hooks

Animating with requestAnimationFrame should be easy, but if you haven’t read React’s documentation thoroughly then you will probably run into a few things that might cause you a headache. Here are three gotcha moments I learned the hard way.

TLDR: Pass an empty array as a second parameter for useEffect to avoid it running more than once and pass a function to your state’s setter function to make sure you always have the correct state. Also, use useRef for … Read article

The post Using requestAnimationFrame with React Hooks appeared first on CSS-Tricks.

21 Aug

Other Ways to SPAs

That rhymed lolz.

I mentioned on a podcast the other day that I sorta think WordPress should ship with Turbolinks. It's a rather simple premise:

Build a server-rendered site. Turbolinks intercepts clicks on same-origin links. It uses AJAX for the HTML of the new page and replaces the current page with the new one.

In other words, turning a server-rendered app into "Single Page App" (SPA) by way of adding this library.

Why bother? It can be … Read article

The post Other Ways to SPAs appeared first on CSS-Tricks.