{"id":17695830,"url":"https://github.com/nadako/tinkstatesharp","last_synced_at":"2025-04-13T00:51:06.368Z","repository":{"id":63619337,"uuid":"568055045","full_name":"nadako/TinkStateSharp","owner":"nadako","description":"Handle those pesky states, now in C#","archived":false,"fork":false,"pushed_at":"2024-12-18T11:54:23.000Z","size":12311,"stargazers_count":45,"open_issues_count":20,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T18:52:24.141Z","etag":null,"topics":["csharp","godot","reactive","state-management","unity"],"latest_commit_sha":null,"homepage":"https://nadako.github.io/TinkStateSharp/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nadako.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"nadako","patreon":"nadako"}},"created_at":"2022-11-19T10:02:54.000Z","updated_at":"2025-03-01T01:05:00.000Z","dependencies_parsed_at":"2024-07-26T13:01:28.407Z","dependency_job_id":"6045e120-fadb-40e0-9f27-eb0e1c8e2515","html_url":"https://github.com/nadako/TinkStateSharp","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/nadako%2FTinkStateSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadako%2FTinkStateSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadako%2FTinkStateSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadako%2FTinkStateSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nadako","download_url":"https://codeload.github.com/nadako/TinkStateSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650435,"owners_count":21139672,"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":["csharp","godot","reactive","state-management","unity"],"created_at":"2024-10-24T14:07:07.230Z","updated_at":"2025-04-13T00:51:06.349Z","avatar_url":"https://github.com/nadako.png","language":"C#","funding_links":["https://github.com/sponsors/nadako","https://patreon.com/nadako"],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/nadako/TinkStateSharp/actions/workflows/build.yml/badge.svg)](https://github.com/nadako/TinkStateSharp/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/nadako/TinkStateSharp/branch/master/graph/badge.svg?token=92NEEMYYBL)](https://codecov.io/gh/nadako/TinkStateSharp)\n\n# TinkState# - Reactive State Handling for C# (and Unity!)\n\nAn uncomplicated library for dealing with mutable state in a nice reactive way.\n\n[Documentation](https://nadako.github.io/TinkStateSharp/).\n\nFeatures:\n - Lightweight and generic observable state primitives\n - Efficient binding mechanism with support for per-frame batching\n - Computed states with automatic update propagation\n - Asynchronously computed states with async/await\n - Out-of-the-box support for Unity with convenience helpers\n - Experimental support for Godot!\n\n## Quick Peek\n\nHere's a \"hello world\" teaser in Unity (source code below).\n\n![](docs/helloworld.gif)\n\n\u003cdetails\u003e\n\u003csummary\u003eSource Code\u003c/summary\u003e\n\n```cs\nusing TinkState;\nusing TMPro;\nusing UnityEngine;\n\npublic class HelloWorld : MonoBehaviour\n{\n\t[SerializeField] TMP_InputField nameInput;\n\t[SerializeField] TMP_Text greetingLabel;\n\n\tvoid Start()\n\t{\n\t\t// define piece of mutable observable state\n\t\tvar name = Observable.State(\"World\");\n\n\t\t// bind the state two-ways to an input field\n\t\tname.Bind(nameInput.SetTextWithoutNotify);\n\t\tnameInput.onValueChanged.AddListener(newValue =\u003e name.Value = newValue);\n\n\t\t// derive automatically updated observable value from it\n\t\tvar greeting = Observable.Auto(() =\u003e $\"Hello, {name.Value}!\");\n\n\t\t// bind the auto-observable to a text field\n\t\tgreeting.Bind(text =\u003e greetingLabel.text = text);\n\t}\n}\n```\n\u003c/details\u003e\n\n## Status\n\n**BETA**. Everything seems to be working and test coverage makes sure of it, but the code could use some polishing, naming review, performance audit. See also TODOs in the code.\n\n## Thanks\n\nIt is a C# port of an excellent [Haxe](https://haxe.org/) library [tink_state](https://github.com/haxetink/tink_state) by Juraj Kirchheim ([@back2dos](https://github.com/back2dos)).\n\n## [Unlicense](https://unlicense.org/)\n\nThis is free and unencumbered software released into the public domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadako%2Ftinkstatesharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnadako%2Ftinkstatesharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadako%2Ftinkstatesharp/lists"}