Relative Content

Tag Archive for javascriptreactjsgatsby

Page will not load even though a javascript file with its name has been created

I’m new to react and gatsby so I am following the gatsby tutorial online. I was steadily working through Part 2 when I ran into problem. On the tutorial they have created a second javascript file called about.js and added a basic component and exported it at the end. I did all that, granted I typed it all out myself and changed up the text in the html stuff a little but nothing that should affect the outcome of the program too much. But when I go to http://localhost:8000/about/ I get a 404 error and the gatsby development 404 page. To make things worse at the bottom it has a list of pages that it recognizes and http://…/about/ is one of them. Anyone know what is happening here? I will put the code for the home and about page along with screenshots below.

How Do We Access a Data Field that Starts With a “@” Symbol?

I’m working on a project for displaying upcoming tech events. Inside the data object I get from the backend app there’s an object for the location of the event. Inside the location object there’s a property named @type which indicates whether the event is online or at a physical location. I need to check the value of this property to conditionally determine whether I need to render data from an address object or the value of a url property.