Continuing from our last post, this is now our component code: import React from ‘react’; import { NavLink } from ‘react-router-dom’; import “./YearsUpdates.scss”; class YearsUpdates extends React.Component { constructor(props) { super(props); this.state = { } } getLink(type) { switch (type) … Continue reading

Sample JSON data: The data is sorted by year and each update has a name and type. To import this data into a component: Import the JSON by linking to it. Set a variable to contain all the data. We … Continue reading

First you will need react-router-dom. Install it using: Here is the code that directs you to each page: BrowserRouter is the container. Switch will find and render the first page that matches the path/url. Link to the pages using NavLinks:

Here is the code: We set up the default state in the constructor and bind the on click function that toggles the state using the previous state. The bind makes “this” work in the function. Then the navigation’s class updates … Continue reading

It sounds simple enough. Just run npm install node-sass and change your css file file to a scss. Well… it didn’t work for me. What I need to do was update my Create-React-App to Version 2. To do this, go … Continue reading

Safari on mobile will resize your fonts if it thinks it’s too small. This is probably related to accessibility but it doesn’t make sense to me and is annoying. Anyways to fix it add this Original post here.