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.
LiveView is a hex library for managing application state and…
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!
Without going into too much detail, essentially you can trace the Prompt
component all the way through RouterContext
, Router
and BrowserRouter
.
This is a comprehensive guide for creating your first static site using Hugo and hosting it on GitHub pages.
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.