{"id":27054884,"url":"https://github.com/adamlewkowicz/use-frontend","last_synced_at":"2026-04-12T11:34:29.222Z","repository":{"id":44018156,"uuid":"231392729","full_name":"adamlewkowicz/use-frontend","owner":"adamlewkowicz","description":"Transform React.js Hooks to Vue.js Composition Api ⚓⚛️ ","archived":false,"fork":false,"pushed_at":"2023-01-05T04:34:27.000Z","size":10830,"stargazers_count":3,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T09:17:36.205Z","etag":null,"topics":["babel","react-hooks","reactjs","transform","vue-composition-api","vuejs"],"latest_commit_sha":null,"homepage":"https://alk831.github.io/use-frontend/","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/adamlewkowicz.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}},"created_at":"2020-01-02T13:58:40.000Z","updated_at":"2023-02-28T12:10:38.000Z","dependencies_parsed_at":"2023-02-03T10:01:07.383Z","dependency_job_id":null,"html_url":"https://github.com/adamlewkowicz/use-frontend","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/adamlewkowicz/use-frontend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlewkowicz%2Fuse-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlewkowicz%2Fuse-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlewkowicz%2Fuse-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlewkowicz%2Fuse-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamlewkowicz","download_url":"https://codeload.github.com/adamlewkowicz/use-frontend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamlewkowicz%2Fuse-frontend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31713876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T06:22:27.080Z","status":"ssl_error","status_checked_at":"2026-04-12T06:21:52.710Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","react-hooks","reactjs","transform","vue-composition-api","vuejs"],"created_at":"2025-04-05T09:17:39.699Z","updated_at":"2026-04-12T11:34:29.206Z","avatar_url":"https://github.com/adamlewkowicz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-frontend\n[![Build Status](https://travis-ci.com/alk831/use-frontend.svg?branch=master)](https://travis-ci.com/alk831/use-frontend)\n\nTransform React.js Hooks to Vue.js Composition Api\n\n```js\nconst [counter, setCounter] = useState(0); // React Hooks\n\n// Transforms into\n\nconst counter = reactive(0); // Vue Composition Api\n```\n\n## Local installation\nClone the respository and run `npm i`.\n\nTo run dev server execute `npm run dev` command.\n\n\n## Todo\n### useEffect\n  - [x] remove cleanup callback from `onMounted`\n  - [x] create `watch` if contains dependencies\n  - [x] create `onMounted` if dependencies are empty\n  - [x] create `onUpdated` if there are no dependencies\n  - [x] if contains cleanup callback\n    - [x] create `onMounted` hook\n    - [x] remove return cleanup callback from original callback\n    - [x] create additional `onUnmounted` lifecycle cleanup hook\n### useRef\n  - [x] replace `useRef` with `ref`\n  - [x] replace `.current` with `.value`\n### useState\n  - [x] replace `useState` with `ref` or `reactive`\n  - [x] transform `setState` call with raw expression\n  - [ ] if was transformed to `ref`\n    - [ ] replace every value access with `.value` member property access\n  - [ ] transform initial state function provider to `ref` or `reactive` IIFE\n  - [ ] unwrap callback's body from `setState` call\n    - [x] rename argument to used in state declaration\n    - [ ] rename argument in complex function body\n### useCallback\n  - [x] replace `useCallback` with wrapped callback in `computed`\n  - [ ] replace `useCallback` with raw callback\n### useMemo\n  - [x] replace `useMemo` with `computed`\n### useContext\n  - [x] replace `useContext` with `inject`\n### useLayoutEffect\n  - [x] replace `useLayoutEffect` with `onBeforeMount`\n  - [ ] if has cleanup callback\n    - [ ] create additional `onUnmounted` lifecycle hook\n    \n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamlewkowicz%2Fuse-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamlewkowicz%2Fuse-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamlewkowicz%2Fuse-frontend/lists"}