{"id":20302363,"url":"https://github.com/re-js/tfrp","last_synced_at":"2026-04-20T06:05:43.238Z","repository":{"id":57711861,"uuid":"514858570","full_name":"re-js/tfrp","owner":"re-js","description":"Transparent Functional Reactive Programming","archived":false,"fork":false,"pushed_at":"2022-08-15T13:32:17.000Z","size":7,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T15:16:31.525Z","etag":null,"topics":["decorators","functional","reactive","remini","trfp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/re-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-17T13:58:07.000Z","updated_at":"2022-08-08T08:57:07.000Z","dependencies_parsed_at":"2022-08-28T12:00:42.306Z","dependency_job_id":null,"html_url":"https://github.com/re-js/tfrp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/re-js%2Ftfrp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/re-js%2Ftfrp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/re-js%2Ftfrp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/re-js%2Ftfrp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/re-js","download_url":"https://codeload.github.com/re-js/tfrp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241801194,"owners_count":20022383,"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":["decorators","functional","reactive","remini","trfp"],"created_at":"2024-11-14T16:30:56.251Z","updated_at":"2026-04-20T06:05:43.199Z","avatar_url":"https://github.com/re-js.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Class decorators for TFRP\n\n[![npm version](https://img.shields.io/npm/v/tfrp?style=flat-square)](https://www.npmjs.com/package/tfrp)\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/tfrp?style=flat-square)](https://bundlephobia.com/result?p=tfrp)\n[![code coverage](https://img.shields.io/coveralls/github/re-js/tfrp?style=flat-square)](https://coveralls.io/github/re-js/tfrp)\n[![typescript supported](https://img.shields.io/npm/types/typescript?style=flat-square)](./src/index.d.ts)\n\nTransparent Functional Reactive Programming\n\n`prop` - reactive value marker decorator. Each reactive value has an immutable state. If the immutable state will update, all who depend on It will refresh.\n\n```javascript\nimport { prop } from 'tfrp';\nimport { on } from 'remini';\n\nclass Todos {\n  @prop items = [];\n\n  constructor() {\n    on(() =\u003e this.items, () =\u003e console.log('items changed'));\n  }\n\n  add(todo: string) {\n    this.items = this.items.concat(todo); // an immutable modification\n  }\n}\n```\n\n`cache` - is the decorator for define selector on class getter.\n\n```javascript\nimport { prop, cache } from 'tfrp';\n\nclass Todos {\n  @prop items = [];\n\n  @cache get completed() {\n    return this.items.filter(item =\u003e item.completed);\n  }\n}\n```\n\nYou can configure [babel jsx wrapper](https://github.com/betula/babel-plugin-jsx-wrapper) for automatic observation arrow function components if you want.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fre-js%2Ftfrp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fre-js%2Ftfrp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fre-js%2Ftfrp/lists"}