-
-
Save Arcath/ce20a108098c433aa7d0a898a683d463 to your computer and use it in GitHub Desktop.
Etch Router Announcement Post
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 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}) | |
) | |
) |
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
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