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 from 'react'; | |
import './App.css'; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
titleName: '' | |
}; | |
} | |
render() { |
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 from 'react'; | |
import './App.css'; | |
function App() { | |
return ( | |
<div className="App"> | |
<h1>Hello World</h1> | |
</div> | |
); | |
} |
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 from 'react'; | |
import { Helmet } from 'react-helmet'; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
titleName: '' | |
}; |
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
$ npm i react-helmet | |
# or, using Yarn: | |
$ yarn add react-helmet |
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
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
titleName: '' | |
}; | |
} | |
changeTitle(ev) { |
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 from 'react'; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
titleName: '' | |
}; | |
} |
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 from 'react'; | |
import './App.css'; | |
function App() { | |
return ( | |
<div className="App"> | |
<h1>Hello World</h1> | |
</div> | |
); | |
} |
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
export const addNumbers = functions.https.onRequest((request, response) => { | |
response.send(Number(request.query.a) + Number(request.query.b)); | |
}); |
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 functions from 'firebase-functions'; | |
export const helloWorld = functions.https.onRequest((request, response) => { | |
response.send("Hello from Firebase!"); | |
}); |
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
myproject | |
+- functions/ | |
| | |
+- package.json # npm pkg file | |
| | |
+- tsconfig.json | |
| | |
+- tslint.json # Optional - if you opted out of tslint, this wont be here | |
| | |
+- src/ # Directory containing TypeScript source |