{"id":18285891,"url":"https://github.com/exodusmovement/heat-map-view","last_synced_at":"2025-04-14T03:51:11.303Z","repository":{"id":66093564,"uuid":"531948035","full_name":"ExodusMovement/heat-map-view","owner":"ExodusMovement","description":"Heat up performance offenders","archived":false,"fork":false,"pushed_at":"2024-07-25T19:56:47.000Z","size":2556,"stargazers_count":44,"open_issues_count":0,"forks_count":2,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-27T17:51:40.429Z","etag":null,"topics":[],"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/ExodusMovement.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-09-02T13:59:51.000Z","updated_at":"2024-12-13T18:11:15.000Z","dependencies_parsed_at":"2024-07-25T22:36:41.757Z","dependency_job_id":"b6e0e495-5151-4088-a546-842c3789088a","html_url":"https://github.com/ExodusMovement/heat-map-view","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/ExodusMovement%2Fheat-map-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fheat-map-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fheat-map-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExodusMovement%2Fheat-map-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExodusMovement","download_url":"https://codeload.github.com/ExodusMovement/heat-map-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565060,"owners_count":21125415,"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":"2024-11-05T13:18:06.141Z","updated_at":"2025-04-14T03:51:11.281Z","avatar_url":"https://github.com/ExodusMovement.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Heat Map View`\n\n![Heat Map View logo](https://github.com/ExodusMovement/heat-map-view/raw/master/logo.gif)\n\n\u003e Heat up performance offenders! 🔥\n\n\u003cbr\u003e\n\nHeatMapView helps us detect frequently re-rendered views without having phone connected to computer at all times.\nA significant portion of React performance issues are caused by unnecessary re-renders. This library enables us to observe components which are re-rendered too frequently in real time.\n\n## Installation\n\n```sh\nyarn add @exodus/heat-map-view\n```\n\n## Usage\n\nImport `initHeatMapView`\n```js\nimport { initHeatMapView } from '@exodus/heat-map-view'\n```\n\n\nInitialize it in `App.js`\n\n```js\nuseEffect(\n  () =\u003e {\n    if (ready) {\n      if (__DEV__) {\n        initHeatMapView({\n          enabled: true,\n          divisor: 20,\n          dynamicOpacity: false, \n          overlayStyle: {\n            borderWidth: 1,\n            borderColor: 'white',\n          },\n\n          surface: 'floor',\n          skipInstances: 1,\n          opacity: 0.5,\n        })\n      }\n    }\n  },\n  [ready]\n)\n```\n\u003cbr\u003e\n\n## Config\n\n| Prop | Default | Params Type | Description |\n| --- | --- | --- | --- |\n| divisor | 30 | number | Render count divisor. Heat is calculated by `renderCount / divisor` = [0-1]. 0 - Blue, 1 - Red. |\n| dynamicOpacity | false | boolean | Heat makes view less transparent. If enabled 0 - Fully transparent, 1 - Fully opaque.|\n| opacity | 0.5 | number | HeatMap overlay opacity. Disabled if `dynamicOpacity === true` |\n| minHeat | 0 | number | Minimum heat value to be visible. |\n| maxHeat | -1 | number | Maximum heat value to be visible. -1 equals infinity. |\n| overlayStyle | {} | object | Custom overlay style. | \n| surface | 'floor' | `'floor'\\|'ceiling'` | Should heatmap draw on top or bottom of the component. | \n| skipInstances | 2 | number | Skips initial number view instances. |\n\n\n\u003cbr\u003e\n\n## Disable/Enable HeatMapView in runtime\n\n\n```js\nimport {\n  initHeatMapView, // Initializes and enables HeatMapView\n  installHeatMapView, // Enables HeatMapView\n  uninstallHeatMapView, // Disables HeatMapView\n  isHeatMapViewInstalled, // Check if HeatMapView is enabled\n} from '@exodus/heat-map-view'\n```\n\nCreate Heat Map toggler\n\n```js\nconst styles = StyleSheet.create({\n  heatMapViewEmergency: {\n    position: 'absolute',\n    height: 30,\n    width: 50,\n    backgroundColor: 'transparent',\n    left: dimensionsWidth / 2 - 25,\n    top: getStatusBarHeight(),\n  },\n})\n\nfunction HeatMapViewToggle() {\n  return (\n    \u003cTouchableOpacity\n      style={styles.heatMapViewEmergency}\n      onPress={() =\u003e {\n        if (isHeatMapViewInstalled()) {\n          uninstallHeatMapView()\n        } else {\n          installHeatMapView()\n        }\n      }}\n    /\u003e\n  )\n}\n```\n\n\u003cbr\u003e\n\n## Roadmap\n- [ ] Dynamic heat style provider\n- [ ] Heat by velocity (Friction)\n- [x] Include example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fheat-map-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexodusmovement%2Fheat-map-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexodusmovement%2Fheat-map-view/lists"}