Blog | PubliusLogic

✨ Listing all Posts.

For Refinements see Categories or Tags

JavaScript media queries

JavaScript media queries

 April 18, 2019  Category  tech
Taken From janosh.io Note: This post assumes you’re using React (16.8 or later). One thing I like about is that it enables concise and JavaScript-accessible media queries. For this site, I’m using a utility file that exports the following object. With this setup, you get consistent media queries all over your site by simply importing that object wherever you want to use a media query: However…

Keep Reading →

Gatsby GitHub Comments Utterances

Gatsby GitHub Comments Utterances

 April 16, 2019  Category  tech
React withUtterances Repo Why use withUtterances as utterances Taken From: bhnywl.com Lets say all your users are developers and already have a GitHub account so they don’t need to sign up for yet another 3rd party service like Disqus (which will also track their every move through the web 😈) Unlike Staticman GitHub Issues are truly dynamic so new comments will show without having to wait for…

Keep Reading →

Google Maps + React Hooks

Google Maps + React Hooks

 March 25, 2019  Category  tech
Taken From janosh.io Google Maps + React Hooks Had to share this one since it is so nice and simple. If you are looking for a drop-in, zero-dependency Google Maps React component, look no further. Here it is: To use it, simply grab a free Google Maps API key from Google cloud console (here is a guide for that) and either add it to your .env file or paste it in directly for GOOGLEMAPSAPI_KEY. Then…

Keep Reading →

React Hooks Masonry

React Hooks Masonry

 March 25, 2019  Category  tech
Taken From janosh.io React Hooks Masonry Now that we have React Hooks, so many components can (and probably should despite what Dan said at React Conf) be rewritten in a more succinct, readable and maintainable manner. A perfect candidate for this in my own code base was a component that used to rely on CSS grid with very narrow rows and managing the number of rows each child item spans based on…

Keep Reading →

Gatsby React Disqus Comments

Gatsby React Disqus Comments

 March 25, 2019  Category  tech
Taken From janosh.io Gatsby React Disqus Comments If you’re running a Gatsby blog (or any React-powered blog for that matter) and you’d like to add comment functionality, rest assured, it’s very easy. I just went through that process and the only thing that took time was deciding which service to use. There are quite a few to choose from. The ones I considered were all mentioned in a 2017 Gatsby…

Keep Reading →

React Hooks Modal

React Hooks Modal

 March 25, 2019  Category  tech
Taken From React Hooks Modal janosh.io Ready to start coding. But what to do first? One thing that seemed a good fit for hooks are modals. I’d implemented them once or twice before and in both cases came away with the feeling that a class component with all its boilerplate is overkill considering the tiny bit of state management required for modal functionality. As expected, using hooks I was able…

Keep Reading →

MailChimp Newsletters

Newsletters

Enjoyed this post? Want the next one in your inbox!

Secure Email

Slack

Slack @donboulton

Bring your team together with Slack, Work collaboration hub.

Netlify Functions  Message Me!

PubliusLogic

Heatmaps by Hotjar

Hotjar is the fast and visual way to understand your users..

Hotjar