{"id":22278148,"url":"https://github.com/robbestad/svenjs","last_synced_at":"2025-09-11T12:36:13.612Z","repository":{"id":36221269,"uuid":"40525561","full_name":"robbestad/svenjs","owner":"robbestad","description":"A JavaScript framework for composable web apps","archived":false,"fork":false,"pushed_at":"2018-08-24T10:59:52.000Z","size":882,"stargazers_count":45,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-27T05:32:38.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robbestad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-11T06:31:53.000Z","updated_at":"2020-03-30T08:54:37.000Z","dependencies_parsed_at":"2022-09-05T18:31:00.993Z","dependency_job_id":null,"html_url":"https://github.com/robbestad/svenjs","commit_stats":null,"previous_names":["svenanders/svenjs","svenanders/universaljs"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/robbestad/svenjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2Fsvenjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2Fsvenjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2Fsvenjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2Fsvenjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbestad","download_url":"https://codeload.github.com/robbestad/svenjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbestad%2Fsvenjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274634964,"owners_count":25321831,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-03T15:13:15.235Z","updated_at":"2025-09-11T12:36:13.586Z","avatar_url":"https://github.com/robbestad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SvenJS\n\nA JavaScript framework for composable web apps\n\n# Demos\n\n  - [TodoMVC](http://svenanders.github.io/svenjs-todomvc/) ([Source](https://github.com/svenanders/svenjs-todomvc))\n\n# Releases\n\n - 2.0.2: ES modules, bug fixes and more!\n - 0.3.2: Added *_beforeMount* life cycle method. \n - 0.3.1: Added composition (importing components and referencing them in JSX by name). For instance: _const SecondComponent = require(\"SecondComponent\")_. Referenced in _render_ like this: _\u003cSecondComponent /\u003e_\n - 0.3.0: Renamed life cycle methods. New names: *_didMount* \u0026 *_didUpdate*\n\n# Features\n\n - Enforced state immutability\n\n - Minimal file size\n\n# Goals\n\n - Can be used in a browser script tag (almost there)\n\n - A web library that enables you to write code that can be accessed both serverside and clientside\n\n - Built in store implementation (todo)\n\n# Install\n\nUse the npm version:\n\n```bash\n  npm install svenjs\n```\n\nBuild youself. Clone this repo and run\n\n```bash\n  npm run build\n```\n\n# How to use \n\n```html\nimport SvenJs from \"svenjs\";\n\nSvenJs.create({\n    initialState: {\n        clicks: 0\n    },\n    render() {\n    const clickFunc = () =\u003e{\n      let clicks=this.state.clicks;\n      this.setState({clicks: ++clicks });\n    }\n    return (\u003cdiv id=\"row\"\u003e\n            \u003ch3\u003eThe Click App\u003c/h3\u003e\n            \u003cdiv\u003e\n              \u003cbutton onClick={clickFunc}\u003eClick me?\u003c/button\u003e\n            \u003c/div\u003e\n        \u003cdiv\u003e\n            \u003ch3\u003eClick stats\u003c/h3\u003e\n          \u003cp\u003eYou have clicked on the button {this.state.clicks} times\u003c/p\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e)\n    }\n});\nSvenJs.render(App, document.getElementById(\"app\"))\n```\n\n## Related Modules\n\n* [svenjsx](https://github.com/svenanders/svenjsx) - JSX as used by SvenJS.\n\n* [svenjsx-loader](https://github.com/svenanders/svenjsx-loader) - Webpack loader for SvenJS.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbestad%2Fsvenjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbestad%2Fsvenjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbestad%2Fsvenjs/lists"}