{"id":15297093,"url":"https://github.com/rwu823/react-dev-memo","last_synced_at":"2025-04-13T23:01:22.799Z","repository":{"id":40936393,"uuid":"203391157","full_name":"rwu823/react-dev-memo","owner":"rwu823","description":"🍗 Don't let your pure component no pure.","archived":false,"fork":false,"pushed_at":"2023-12-15T08:40:30.000Z","size":2783,"stargazers_count":3,"open_issues_count":19,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T12:03:11.205Z","etag":null,"topics":["component","debug","dev","memo","pure","react","tool"],"latest_commit_sha":null,"homepage":"https://rwu823.github.io/react-dev-memo","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/rwu823.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":"2019-08-20T14:17:26.000Z","updated_at":"2022-04-10T18:49:50.000Z","dependencies_parsed_at":"2024-09-30T19:15:07.919Z","dependency_job_id":"50ae77a4-49ff-420e-b9a3-65327c917660","html_url":"https://github.com/rwu823/react-dev-memo","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"02228f7e2de891dcf7e803e0404475add7f7025a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-dev-memo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-dev-memo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-dev-memo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwu823%2Freact-dev-memo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwu823","download_url":"https://codeload.github.com/rwu823/react-dev-memo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794565,"owners_count":21162614,"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":["component","debug","dev","memo","pure","react","tool"],"created_at":"2024-09-30T19:15:05.260Z","updated_at":"2025-04-13T23:01:22.738Z","avatar_url":"https://github.com/rwu823.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"./public/logo.png\"/\u003e\n  \u003cp\u003ereact-dev-memo\u003c/p\u003e\n  \u003ca href=\"https://circleci.com/gh/rwu823/react-dev-memo\" alt=\"Build Status\"\u003e\n    \u003cimg src=\"https://img.shields.io/circleci/build/github/rwu823/react-dev-memo/master?style=for-the-badge\u0026logo=circleci\" /\u003e\n  \u003c/a\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.org/package/react-dev-memo\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/react-dev-memo?style=for-the-badge\u0026logo=npm\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/github/rwu823/react-dev-memo\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/rwu823/react-dev-memo/master?style=for-the-badge\u0026logo=codecov\"/\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/react-dev-memo?style=for-the-badge\u0026logo=webpack\" /\u003e\n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003e\n  \u003csub\u003eDon't let your pure component no pure.\u003c/sub\u003e\n\u003c/h4\u003e\n\n\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"https://rwu823.github.io/react-dev-memo\"\u003eLive Demo\u003c/a\u003e\n\u003c/h3\u003e\n\n## Screen\n![demo-screen](./public/demo-screen.gif)\n\n\n## Story\nIn these recent days, React team released a new [devtool](https://reactjs.org/blog/2019/08/15/new-react-devtools.html) version it's awesome and more efficiently but loss `highlight update` 😢. When we're developing a pure component and the one important thing is how to make sure our component is really pure. So that is why `react-dev-memo` is created.\n\n\n## Installation\n\n```sh\nyarn add react-dev-memo\n```\nInstalls without `--dev` because it's able to work on production.\n\n## Usage\n\n```diff\nimport React from 'react'\n+ import devMemo from 'react-dev-memo'\n\n- const PureComponent = ({ name, age }) =\u003e \u003cdiv /\u003e\n+ const PureComponent = ({ name, age, ...props }) =\u003e \u003cdiv {...props} /\u003e\n\n\n- export default React.memo(PureComponent, (prevProps, nextProps) =\u003e prevProps.name === nextProps.name \u0026\u0026 prevProps.age === nextProps.age)\n+ export default devMemo(PureComponent, ['name', 'age'])\n```\n\n### Injected style props\nAnd the highlighted styles inject `style` props into your component:\n\n```diff\nimport devMemo from 'react-dev-memo'\n\n- const PureComponent = () =\u003e \u003cdiv /\u003e\n+ const PureComponent = props =\u003e \u003cdiv {...props} /\u003e\n\nexport default devMemo(PureComponent)\n```\n\n## Options\n\n```ts\nexport interface DevMemoOptions {\n  /** display highlight */\n  highlight: boolean\n\n  /** display console */\n  console: boolean\n\n  /** set outline style */\n  outline: string\n\n  /** set highlight duration time */\n  duration: number\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwu823%2Freact-dev-memo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwu823%2Freact-dev-memo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwu823%2Freact-dev-memo/lists"}