{"id":24511750,"url":"https://github.com/devnax/with-memoize","last_synced_at":"2025-10-19T16:51:07.551Z","repository":{"id":112974113,"uuid":"518495520","full_name":"devnax/with-memoize","owner":"devnax","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-27T14:40:00.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T00:41:25.344Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devnax.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-27T14:38:53.000Z","updated_at":"2022-07-27T14:40:03.000Z","dependencies_parsed_at":"2023-07-09T22:02:08.957Z","dependency_job_id":null,"html_url":"https://github.com/devnax/with-memoize","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/devnax%2Fwith-memoize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnax%2Fwith-memoize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnax%2Fwith-memoize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnax%2Fwith-memoize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devnax","download_url":"https://codeload.github.com/devnax/with-memoize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713387,"owners_count":20335566,"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":[],"created_at":"2025-01-22T00:41:21.879Z","updated_at":"2025-10-08T04:51:44.250Z","avatar_url":"https://github.com/devnax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n### API documentation\nThe `with-memoize` is a simple wrapper for cache a component. \nthat cache the most recent result. However, this cache can be destroyed by React when it wants to\n\nThe `with-memoize` function accepts the properties `Component` and `callback` the callback is optional. If you don't give the callback then dependancy will be props values\n\n```\nyarn add with-memoize\n# or\nnpm install with-memoize --save\n```\n\n\n## Usage\n\n```js\nimport { FC } from \"react\"; \nimport withMemo from \"with-memoize\";\n\nconst Example: FC\u003c{count: number }\u003e = ({ count }) =\u003e (\n  \u003cdiv\u003e{count}\u003c/div\u003e\n);\n\nexport default withMemo(Example, (props) =\u003e {\n  // do somthing\n  return [props.count]\n});\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnax%2Fwith-memoize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevnax%2Fwith-memoize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnax%2Fwith-memoize/lists"}