Skip to content

Instantly share code, notes, and snippets.

View missating's full-sized avatar
🏠
Working from home

Vanessa (Nkoyo) Ating missating

🏠
Working from home
View GitHub Profile
@missating
missating / blog-routes.txt
Last active March 5, 2023 09:25
Blog routes table showing the 7 different route for my medium post Restful routes
| NAME | PATH | HTTP VERB | PURPOSE |
|----------|----------------|-----------------|--------------------------------------|
| Index | /blog | GET | Displays all blog post |
| New | /blog/new | GET | Shows new form for new blog entry |
| Create | /blog | POST | Creates a new blog post |
| Show | /blog/:id | GET | Shows one specified blog post |
| Edit | /blog/:id/edit | GET | Shows edit form for one blog post |
| Update | /blog/:id | PUT | Updates a particular blog post |
| Destroy | /blog/:id | DELETE | Deletes a particular blog post |
@missating
missating / App.tsx
Last active September 17, 2018 09:38
import * as React from 'react';
import PageInterface from '../PageInterface';
class App extends React.Component<PageInterface, {}> {
render() {
return (<div>
<h1>Welcome to React with Typescript</h1>
<p>The color of this page is: {this.props.color}</p>
</div>
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.tsx',
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
output: {
const path = require('path');
module.exports = {
entry: './src/index.tsx',
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
output: {
path: path.join(__dirname, '/dist'),
filename: 'bundle.min.js'
{
"compilerOptions": {
"sourceMap": true,
"noImplicitAny": false,
"module": "commonjs",
"target": "es6",
"lib": [
"es2015",
"es2017",
"dom"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TypeScript + React</title>
</head>
<body>
<div id="root">
@missating
missating / index.tsx
Last active September 17, 2018 08:49
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import App from './components/App';
ReactDOM.render (
<App color="Blue" />,
document.getElementById("root")
);
export default interface Page {
color: string;
}
const path = require('path');
module.exports = {
entry: './src/index.tsx',
output: {
path: path.join(__dirname, '/dist'),
filename: 'bundle.min.js'
}
}