{"id":15390628,"url":"https://github.com/solidzoro/babel-plugin-add-react-mobx-observer-displayname","last_synced_at":"2026-04-18T01:02:18.399Z","repository":{"id":57188794,"uuid":"445396105","full_name":"SolidZORO/babel-plugin-add-react-mobx-observer-displayname","owner":"SolidZORO","description":"Automatically add a displayName property to your mobx observer's React Components.","archived":false,"fork":false,"pushed_at":"2022-01-07T10:35:05.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T16:05:46.628Z","etag":null,"topics":["babel","babel-plugin","display-name","displayname","mobx","observer","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/SolidZORO.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-07T04:22:04.000Z","updated_at":"2025-02-20T00:13:51.000Z","dependencies_parsed_at":"2022-08-28T12:51:35.163Z","dependency_job_id":null,"html_url":"https://github.com/SolidZORO/babel-plugin-add-react-mobx-observer-displayname","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SolidZORO/babel-plugin-add-react-mobx-observer-displayname","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidZORO%2Fbabel-plugin-add-react-mobx-observer-displayname","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidZORO%2Fbabel-plugin-add-react-mobx-observer-displayname/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidZORO%2Fbabel-plugin-add-react-mobx-observer-displayname/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidZORO%2Fbabel-plugin-add-react-mobx-observer-displayname/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolidZORO","download_url":"https://codeload.github.com/SolidZORO/babel-plugin-add-react-mobx-observer-displayname/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidZORO%2Fbabel-plugin-add-react-mobx-observer-displayname/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["babel","babel-plugin","display-name","displayname","mobx","observer","react"],"created_at":"2024-10-01T15:07:17.391Z","updated_at":"2026-04-18T01:02:18.378Z","avatar_url":"https://github.com/SolidZORO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-add-react-mobx-observer-displayname\n\n[![version][npm-img]][npm-url]\n[![license][mit-img]][mit-url]\n[![size][size-img]][size-url]\n[![download][download-img]][download-url]\n\nAutomatically add a `displayName` property to your `mobx observer`'s React Components.\n\n\n## Transform\n\n- ### `Function` observer\n\n  ```jsx\n  const Comp123 = observer(() =\u003e \u003cspan\u003e{Comp123.displayName}\u003c/span\u003e);\n  ```\n\n  To\n\n  ```jsx\n  const Comp123 = observer(() =\u003e \u003cspan\u003eComp123\u003c/span\u003e);\n  ```\n\n- ### `Const` observer\n\n  ```jsx\n  const Comp123 = () =\u003e \u003cspan\u003e{Comp123.displayName}\u003c/span\u003e;\n  \n  Comp123 = observer(Comp123);\n  export { Comp123 };\n  ```\n\n  To\n\n  ```tsx\n  const Comp123 = () =\u003e \u003cspan\u003eComp123\u003c/span\u003e;\n  \n  Comp123 = observer(Comp123);\n  export { Comp123 };\n  ```\n\n\n## Installation\n\n```sh\nyarn add -D babel-plugin-add-react-mobx-observer-displayname\n```\n\n\n## Usage\n\n```js\n// .babel.config.js\nmodule.exports = {\n  plugins: [\n    ['add-react-mobx-observer-displayname'],\n    //\n    // maybe you also need these like me.\n    // ['add-react-displayname'], // for `normal` React Comp\n    // ['@prisma-capacity/babel-plugin-react-display-name'], // for `forwardRef` and `memo`\n  ]\n}\n```\n\n## Compatible\n\n- \"@babel/core\": \"^7.16.0\",\n- \"mobx\": \"^6.3.12\",\n- \"mobx-react\": \"^7.2.1\",\n- \"webpack\": \"^5.64.4\",\n\n\n## FAQ\n\n- Q: why is an `_` underscore in front of displayname? like `_Comp123`?\n\n  A: add `not android 4.4.3-4.4.4` to your `browserslist`\n\n\n## Related\n\n- [babel-plugin-add-react-displayname](https://github.com/opbeat/babel-plugin-add-react-displayname) (for `normal` React Comp)\n- [babel-plugin-react-display-name](https://github.com/prisma-capacity/babel-plugin-react-display-name) (for `forwardRef` and `memo`)\n\n\n## Thanks\n\nThank you very much [@meyer](https://github.com/meyer), for a babel rookie, without his [babel-plugin-react-observer-displayname](https://github.com/meyer/babel-plugin-react-observer-displayname), I can't write this plugin.\n\n\n## License\n\nMIT © [Jason Feng][author-url]\n\n\u003c!-- badges --\u003e\n\n[author-url]: https://github.com/SolidZORO\n\n\n[mit-img]: https://img.shields.io/npm/l/babel-plugin-add-react-mobx-observer-displayname.svg?style=flat\u0026colorA=000000\u0026colorB=000000\n\n[mit-url]: ./LICENSE\n\n\n[npm-img]: https://img.shields.io/npm/v/babel-plugin-add-react-mobx-observer-displayname?style=flat\u0026colorA=000000\u0026colorB=000000\n\n[npm-url]: https://www.npmjs.com/package/babel-plugin-add-react-mobx-observer-displayname\n\n\n[size-img]: https://img.shields.io/bundlephobia/minzip/babel-plugin-add-react-mobx-observer-displayname?label=bundle\u0026style=flat\u0026colorA=000000\u0026colorB=000000\n\n[size-url]: https://www.npmjs.com/package/babel-plugin-add-react-mobx-observer-displayname\n\n\n[download-img]: https://img.shields.io/npm/dt/babel-plugin-add-react-mobx-observer-displayname.svg?style=flat\u0026colorA=000000\u0026colorB=000000\n\n[download-url]: https://www.npmjs.com/package/babel-plugin-add-react-mobx-observer-displayname\n\n\n[build-img]: https://github.com/SolidZORO/babel-plugin-add-react-mobx-observer-displayname/workflows/badge.svg\n\n[build-url]: https://github.com/SolidZORO/babel-plugin-add-react-mobx-observer-displayname/actions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidzoro%2Fbabel-plugin-add-react-mobx-observer-displayname","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidzoro%2Fbabel-plugin-add-react-mobx-observer-displayname","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidzoro%2Fbabel-plugin-add-react-mobx-observer-displayname/lists"}