This file contains 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 API_URL = | |
'https://newsapi.org/v2/top-headlines?country=us&apiKey=65fe12450a1942bab3176e10e8c48062'; | |
const getParentEl = () => document.querySelector('.list'); | |
const getNews = () => { | |
fetch(API_URL) | |
.then((res) => res.json()) | |
.then((res) => { | |
createList(res.articles); |
This file contains 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, { Suspense, lazy } from 'react'; | |
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; | |
import './App.css'; | |
// importing the Home component by default | |
import Home from './Components/Home'; | |
// importing other components using Dynamic Import | |
const About = lazy(() => |
This file contains 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 * as React from 'react'; | |
import { withAuthorization } from './withAuthorization'; | |
// you can specify interface for props and state, I left it as 'any' | |
class ServerMonitor extends React.Component<any, any> { | |
render(){ | |
return( |
This file contains 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
withDocker: &withDocker | |
docker: | |
- image: circleci/node:9.6 | |
version: 2 | |
jobs: | |
build: | |
working_directory: ~/ProjectDirectory | |
<<: *withDocker | |
steps: | |
- checkout |
This file contains 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
{ | |
"hosting": [ | |
{ | |
"target": "appone", | |
"public": "dist1", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], |