{"id":15503727,"url":"https://github.com/arcath/etch-router","last_synced_at":"2025-09-02T23:44:23.323Z","repository":{"id":51365491,"uuid":"90964136","full_name":"Arcath/etch-router","owner":"Arcath","description":"Router component for Etch","archived":false,"fork":false,"pushed_at":"2024-09-12T09:34:11.000Z","size":5061,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T11:06:33.357Z","etag":null,"topics":["electron","etch","router"],"latest_commit_sha":null,"homepage":"http://etch-router.arcath.net/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arcath.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/register-babel.js","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-11T09:51:49.000Z","updated_at":"2018-06-04T14:24:52.000Z","dependencies_parsed_at":"2024-09-12T19:21:18.593Z","dependency_job_id":"e6bf1159-19d9-48ff-8ed0-d082c633063b","html_url":"https://github.com/Arcath/etch-router","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arcath%2Fetch-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arcath%2Fetch-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arcath%2Fetch-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arcath%2Fetch-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arcath","download_url":"https://codeload.github.com/Arcath/etch-router/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250343909,"owners_count":21415037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","etch","router"],"created_at":"2024-10-02T09:14:34.989Z","updated_at":"2025-04-22T23:50:55.049Z","avatar_url":"https://github.com/Arcath.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Etch-Router\n\n[![Build Status](https://travis-ci.org/Arcath/etch-router.svg?branch=master)](https://travis-ci.org/Arcath/etch-router) [![Join the chat at https://gitter.im/etch-router/Lobby](https://badges.gitter.im/Arcath/jekyll-atom.svg)](https://gitter.im/etch-router/Lobby)\n\nA Router for Etch that provides methods to link and pass props to Etch components\n\n# Install\n\nInstall Etch-Router from npm\n\n```\nnpm install --save etch etch-router\n```\n\nEtch has to be installed seperately, but npm will throw an error when Etch-Router is installed into a package without it.\n\n# Usage\n\nRequire `Router` and `Route` from `etch-router`.\n\n```javascript\nconst {Router, Route} = require('etch-router')\n```\n\nRouter \u0026 Route a just Etch components that are mounted to the DOM. They have no HTML output and instead output the etch components passed to them in their props.\n\nDefine your Router as you would any Etch component:\n\n```javascript\nvar router = new Router(\n  {currentPath: '/'},\n  new Route(\n    {path: '/', component: Layout, name: 'Index'},\n    new Route({path: '/', component: Home, name: 'Home'}),\n    new Route({path: '/about', component: About, name: 'About'})\n  )\n)\n```\n\nAppend your router to the document like normal:\n\n```javascript\ndocument.body.appendChild(router.element)\n```\n\nYou will now have the `Home` component as a child of the `Layout` component. To navigate to other pages update the `router` props to a new `currentPath` e.g.\n\n```javascript\nrouter.update({currentPath: '/about'})\n```\n\nEtch will handle the DOM update and you will now have `About` as a child of `Layout`\n\n# Docs\n\nThe etch-router docs are built from `docs/` and is a functional etch-router application.\n\nInside the `docs/` folder run `npm install` to install all the dependencies.\n\nAny edits to the Javascript also needs to include the compiled webpack bundle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcath%2Fetch-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcath%2Fetch-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcath%2Fetch-router/lists"}