{"id":15739474,"url":"https://github.com/makotot/enabled-update-if","last_synced_at":"2026-05-05T07:33:02.721Z","repository":{"id":66236788,"uuid":"152887574","full_name":"makotot/enabled-update-if","owner":"makotot","description":":six_pointed_star:  Skip unnecessary rerendering with render props.","archived":false,"fork":false,"pushed_at":"2018-10-17T16:47:27.000Z","size":150,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T16:02:29.267Z","etag":null,"topics":["component","performance","react","render-props","shouldcomponentupdate"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/makotot.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}},"created_at":"2018-10-13T15:47:12.000Z","updated_at":"2019-10-25T06:09:47.000Z","dependencies_parsed_at":"2023-02-20T16:31:56.085Z","dependency_job_id":null,"html_url":"https://github.com/makotot/enabled-update-if","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"bbaae903058c9fb9b0e140b9cb53619dbb8277c4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/makotot/enabled-update-if","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makotot%2Fenabled-update-if","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makotot%2Fenabled-update-if/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makotot%2Fenabled-update-if/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makotot%2Fenabled-update-if/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makotot","download_url":"https://codeload.github.com/makotot/enabled-update-if/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makotot%2Fenabled-update-if/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32640535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"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":["component","performance","react","render-props","shouldcomponentupdate"],"created_at":"2024-10-04T02:03:07.380Z","updated_at":"2026-05-05T07:33:02.704Z","avatar_url":"https://github.com/makotot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EnabledUpdateIf\n\n[![npm version](https://img.shields.io/npm/v/enabled-update-if.svg?style=flat-square)](https://www.npmjs.com/package/enabled-update-if)\n[![License](http://img.shields.io/npm/l/enabled-update-if.svg?style=flat-square)](https://github.com/makotot/enabled-update-if)\n[![CircleCI](https://circleci.com/gh/makotot/enabled-update-if.svg?style=svg)](https://circleci.com/gh/makotot/enabled-update-if)\n\n\u003e Skip unnecessary rerendering with render props.\n\n## Why?\n\n`shouldComponentUpdate` in each components is hard to maintain. `\u003cEnabledUpdateIf /\u003e` makes more obvious and readable when the component is able to update or not.\n\n## Install\n\n```sh\n$ npm i enabled-update-if\n```\n\n## Usage\n\n```js\nimport React from 'react'\nimport EnabledUpdateIf from 'enabled-update-if'\n\nreturn (\n  \u003cApp\u003e\n    \u003cEnabledUpdateIf condition={ this.state.isModalHidden }\u003e\n      {\n        () =\u003e (\n          \u003cMainContent\u003e...\u003c/MainContent\u003e\n        )\n      }\n    \u003c/EnabledUpdateIf\u003e\n    \u003cModal isHidden={ this.state.isModalHidden } /\u003e\n  \u003c/App\u003e\n)\n```\n\nIf you want to stop update `\u003cMainContent /\u003e` when modal is opened, wrap with `\u003cEnabledUpdateIf /\u003e` with passing the state of modal visibility to `condition` prop.\n\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakotot%2Fenabled-update-if","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakotot%2Fenabled-update-if","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakotot%2Fenabled-update-if/lists"}