Skip to content

Instantly share code, notes, and snippets.

@Arcath

Arcath/app.js Secret

Last active May 22, 2017 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arcath/ce20a108098c433aa7d0a898a683d463 to your computer and use it in GitHub Desktop.
Save Arcath/ce20a108098c433aa7d0a898a683d463 to your computer and use it in GitHub Desktop.
Etch Router Announcement Post
const etch = require('etch')
const {Route, Router} = require('etch-router')
const Layout = require('./layout') # Require your Etch Components
const Home = require('./home')
const About = require('./about')
var app = new Router(
{},
new Route(
{path: '/', component: Layout},
new Route({path: '/', component: Home}),
new Route({path: '/about', component: About})
)
)
setProp(props){
var newProps = Object.assign({}, this.props, props)
this.update(newProps)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment