Help React Router find its way…

Image for post
Image for post

A guide to making sure your routes work once deployed and support direct URL navigation and a hard refresh.

This guide assumes an environment with at least React 16 and React Router 5. Later versions should work fine.

Before getting started let’s clear up the difference between the different React Router packages and which one does what.

React is built to also allow native development — https://reactnative.dev/, so what it comes down to is whether you’re working on an app that will run in a browser environment or natively.

react-router contains all the common components between react-router-dom and react-router-native. When should you use one over the other? If you’re on the web then react-router-dom should have everything you need as it also exports the common components you’ll need. …


Image for post
Image for post

Compiled vs. Interpreted…

Strongly vs. Weakly typed

Learning a new programming language is hard enough. Worrying about how to categorize that language can be overwhelming. But learning a few of the most common descriptions and categories can go a long way. (If you’re daring enough, feel free to check out some of the other categories here.)

Let’s begin!

Compiled vs. Interpreted Languages


Image for post
Image for post

1) Knowing your selectors: querySelector( ), querySelectorAll( ), getElementsById( ), getElementsByClassName( )

Knowing your selectors, what arguments they take and what their return values are, is essential to navigating through the DOM. Being comfortable with them will allow you to quickly get ahold of and manipulate elements on the fly to add classes, data sets and id values. Below is a summary of how each works. The argument in each is a String.

querySelector

Argument: Common arguments are tag names, class names and the target element’s id. Class names should be preceded by (“.”). Ids should be preceded by (“#”). Tag names can be referred to directly: (“p”).

Return Value: The first matching DOM node within the node that invoked it. …

About

Chris Liendo

Software Engineer • Avid Skier / Snowboarder / Longboarder • Neuroscience Nerd • Mindfulness / Meditation Junkie • Lifelong Learner

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