This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CONSTANTS = { | |
database: { | |
connection_string: "", | |
}, | |
auth: { | |
JWT_SECRET: "", | |
}, | |
testing: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect } from "react"; | |
function App() { | |
// Setting up the useEffect hook | |
// This will trigger on the first reload of the page thanks to the empty [] | |
useEffect(() => { | |
// Fetching data | |
fetch("https://jsonplaceholder.typicode.com/todos/1") | |
// Converting response to a useable JSON format | |
.then((response) => response.json()) |