Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
import './App.css';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
titleName: ''
};
}
render() {
import React from 'react';
import './App.css';
function App() {
return (
<div className="App">
<h1>Hello World</h1>
</div>
);
}
import React from 'react';
import { Helmet } from 'react-helmet';
 
class App extends React.Component {
 
constructor(props) {
super(props);
this.state = {
  titleName: ''
  };
$ npm i react-helmet
# or, using Yarn:
$ yarn add react-helmet
class App extends React.Component {
 
constructor(props) {
super(props);
this.state = {
titleName: ''
};
}
changeTitle(ev) {
import React from 'react';
 
class App extends React.Component {
 
constructor(props) {
super(props);
this.state = {
titleName: ''
};
  }
import React from 'react';
import './App.css';
 
function App() {
return (
  <div className="App">
  <h1>Hello World</h1>
  </div>
  );
}
export const addNumbers = functions.https.onRequest((request, response) => {
response.send(Number(request.query.a) + Number(request.query.b));
});
import * as functions from 'firebase-functions';
export const helloWorld = functions.https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});
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