{"id":19206855,"url":"https://github.com/html-next/flexi-sustain","last_synced_at":"2025-08-17T13:41:56.808Z","repository":{"id":57238271,"uuid":"77409620","full_name":"html-next/flexi-sustain","owner":"html-next","description":"Extended Lifecycles and Recycling for Ember Components","archived":false,"fork":false,"pushed_at":"2018-09-12T22:42:22.000Z","size":573,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T23:46:55.742Z","etag":null,"topics":["flexi","recyling"],"latest_commit_sha":null,"homepage":"","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/html-next.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-26T22:19:18.000Z","updated_at":"2018-09-12T22:42:24.000Z","dependencies_parsed_at":"2022-08-26T15:11:46.700Z","dependency_job_id":null,"html_url":"https://github.com/html-next/flexi-sustain","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/html-next/flexi-sustain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/html-next%2Fflexi-sustain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/html-next%2Fflexi-sustain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/html-next%2Fflexi-sustain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/html-next%2Fflexi-sustain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/html-next","download_url":"https://codeload.github.com/html-next/flexi-sustain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/html-next%2Fflexi-sustain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856575,"owners_count":24657691,"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-08-17T02:00:09.016Z","response_time":129,"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":["flexi","recyling"],"created_at":"2024-11-09T13:17:13.072Z","updated_at":"2025-08-17T13:41:56.767Z","avatar_url":"https://github.com/html-next.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flexi\n\n[![npm version](https://badge.fury.io/js/flexi-sustain.svg)](http://badge.fury.io/js/flexi-sustain)\n[![Ember Observer Score](http://emberobserver.com/badges/flexi-sustain.svg)](http://emberobserver.com/addons/flexi-sustain)\n[![Build Status](https://travis-ci.org/html-next/flexi-sustain.svg)](https://travis-ci.org/html-next/flexi-sustain)\n[![Code Climate](https://codeclimate.com/github/html-next/flexi-sustain/badges/gpa.svg)](https://codeclimate.com/github/html-next/flexi-sustain)\n[![Test Coverage](https://codeclimate.com/github/html-next/flexi-sustain/badges/coverage.svg)](https://codeclimate.com/github/html-next/flexi-sustain/coverage)\n[![dependencies](https://david-dm.org/html-next/flexi-sustain.svg)](https://david-dm.org/html-next/flexi-sustain)\n[![devDependency Status](https://david-dm.org/html-next/flexi-sustain/dev-status.svg)](https://david-dm.org/html-next/flexi-sustain#info=devDependencies)\n\n[Changelog](./CHANGELOG.md)\n\n## Installation\n\n```cli\nember install flexi-sustain\n```\n\n\n## Support, Questions, Collaboration\n\nJoin the [Ember community on Discord](https://discord.gg/zT3asNS)\n\n### Sustain\n\n`Sustain` allows you to recycle a component instance across layout and route boundaries.\n\nA sustain is essentially a \"marker\" for where a particular component instance is able to\nbe reused. It allows you to explicitly declare what features of your app can be \"recycled\".\n\nSustain improves the performance of your app by reducing the amount of work your app needs to do.\n Instead of tearing down one instance and creating an entirely new instance, sustain seamlessly\n swaps a component instance's location as layouts and routes transition from one position to the next.\n\n\n```hbs\n{{sustain \u003cpath-to-sustain\u003e model}}\n```\n\nOnly one instance of the sustainable is alive and rendered at a time, but if you are animating\nfrom one location to another you can choose to leave behind a copy.\n\n```hbs\n{{sustain \u003cpath-to-sustain\u003e model copy=true}}\n```\n\nBy default, a sustain is destroyed when it has gone unused for one minute. You can alter this\nexpiration. A value of `0` will cause the sustain to live forever.\n\n```hbs\n{{sustain \u003cpath-to-sustain\u003e expires=\u003ctime-in-ms\u003e}}\n```\n\nIf you would like to use the same layout for multiple sustain instances, on the same page, you can specify\na `label`. This allows unique instances of the same layout, which update from route to route or layout to layout,\nbut do not overwrite previous sustains in the same template.\n\n```hbs\n{{sustain my-path label='foo'}}\n{{sustain my-path label='bar'}}\n```\n\n\n## Contributing\n\n - Open an Issue for discussion first if you're unsure a feature/fix is wanted.\n - Branch off of `master` (default branch)\n - Use descriptive branch names (e.g. `\u003ctype\u003e/\u003cshort-description\u003e`)\n - Use [Angular Style Commits](https://github.com/angular/angular.js/blob/v1.4.8/CONTRIBUTING.md#commit)\n - PR against `develop` (default branch).\n\n### Commmits\n\nAngular Style commit messages have the full form:\n\n ```cli\n \u003ctype\u003e(\u003cscope\u003e): \u003ctitle\u003e\n\n \u003cbody\u003e\n\n \u003cfooter\u003e\n ```\n\n But the abbreviated form (below) is acceptable and often preferred.\n\n ```cli\n \u003ctype\u003e(\u003cscope\u003e): \u003ctitle\u003e\n ```\n\n Examples:\n\n - chore(deps): bump deps in package.json and bower.json\n - docs(component): document the `fast-action` component\n\n## Thanks\n\nA special thanks goes out to [@ebryn](https://github.com/ebryn) for the\ninspiration to pursue a solution for explicit layouts, and [IsleofCode](https://isleofcode.com)\nfor providing the time to build it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtml-next%2Fflexi-sustain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtml-next%2Fflexi-sustain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtml-next%2Fflexi-sustain/lists"}