“LiveView” television

After attending the 2019 Lone Star Elixir conference in Austin, Texas and hearing the release of Phoenix LiveView announced, I decided I wanted to jump on the train of dabbling in LiveView. At the time, a lot of the examples being released were mini games which is what initially inspired me to recreate Minesweeper! After reading this you should understand what LiveView is, know some of the advantages and disadvantages of server side rendered HTML, and have an insight into how I used LiveView to build a clone of Minesweeper.

What is LiveView?

LiveView is a hex library for managing application state and…

A person up in arms about wanting custom modals in their Prompt component

This is a short walkthrough on how to use React-Router’s v5 Prompt component to replace the built in user confirmation window object with your own custom UserConfirmation modal.

There is another really good article about blocking the navigation to prevent the default modal so that we can render our own custom component instead. They briefly mention an alternative method that involves utilizing BrowserRouter and the getUserConfirmation prop, which is exactly the solution this post covers!

Briefly Behind the Scenes

Without going into too much detail, essentially you can trace the Prompt component all the way through RouterContext, Router and BrowserRouter.

BrowserRouter is where the…

A local duck I photographed recently

This is a comprehensive guide for creating your first static site using Hugo and hosting it on GitHub pages.

Creating your site

First, make sure you have Hugo installed on your machine.

Now you can run these commands to make your first site.

hugo new site hugo_site
cd hugo_site

And there you go! You’ve created your first Hugo site. I mean, there’s nothing in it, but still! Let’s take a look.

hugo server -D

Your web server by default should be hosted at http://localhost:1313/.

There should be nothing here. We have to add themes, content, and lots of other fun stuff.

If you…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store