{"id":19408555,"url":"https://github.com/ninest/rh","last_synced_at":"2026-06-12T04:31:41.481Z","repository":{"id":106604185,"uuid":"597939273","full_name":"ninest/rh","owner":"ninest","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-17T05:35:13.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T02:17:15.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ninest.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ninest","patreon":null,"open_collective":null,"ko_fi":"parthkabra","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.buymeacoffee.com/ninest"]}},"created_at":"2023-02-06T03:14:22.000Z","updated_at":"2023-02-06T03:24:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fc9c87c-7fcc-4887-9e1f-74e84ff18754","html_url":"https://github.com/ninest/rh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ninest/rh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Frh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Frh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Frh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Frh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninest","download_url":"https://codeload.github.com/ninest/rh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninest%2Frh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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-11-10T12:06:33.043Z","updated_at":"2026-06-12T04:31:41.458Z","avatar_url":"https://github.com/ninest.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ninest","https://ko-fi.com/parthkabra","https://www.buymeacoffee.com/ninest"],"categories":[],"sub_categories":[],"readme":"## Development\n\n### `useParameters` and `useSecurities`\n\nThe `onDay` function in `useSecurities` requires `useParameters`'s `parameters` to get the next value of a stock/crypto. But getting the parameters with `const { parameters } = useParameters()` and passing and using it is not enough.\n\nIt seems that `onDay` is passed and called in `startTimer` in `useGame`, only the initial value of parameters is \"caught\". To fix, this, there needs to be a function that gets the current value of parameters:\n\n```tsx\nlet parameters: Parameters;\nsetParameters((p) =\u003e {\n  parameters = p;\n  return p;\n});\n// parameters is now the updated value\n```\n\nThis is hacky, but it works.\n\nThis might be because `useSecurities` itself does not call `onDay`, but rather it is called inside an interval.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninest%2Frh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninest%2Frh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninest%2Frh/lists"}