{"id":49635258,"url":"https://github.com/redneckz/uni-jsx","last_synced_at":"2026-05-05T14:34:24.154Z","repository":{"id":47112605,"uuid":"477073531","full_name":"redneckz/uni-jsx","owner":"redneckz","description":"Unification layer between React, Preact and Vue3. Write React-like unified components and use everywhere without recompilation.","archived":false,"fork":false,"pushed_at":"2024-07-05T10:14:17.000Z","size":989,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-19T18:04:53.730Z","etag":null,"topics":["framework-agnostic","hooks","jsx","react","virtual-dom","vue","vue3","vue3-hooks"],"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/redneckz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-02T14:10:20.000Z","updated_at":"2025-02-23T12:52:48.000Z","dependencies_parsed_at":"2023-02-09T16:01:10.271Z","dependency_job_id":null,"html_url":"https://github.com/redneckz/uni-jsx","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/redneckz/uni-jsx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Funi-jsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Funi-jsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Funi-jsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Funi-jsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redneckz","download_url":"https://codeload.github.com/redneckz/uni-jsx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redneckz%2Funi-jsx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["framework-agnostic","hooks","jsx","react","virtual-dom","vue","vue3","vue3-hooks"],"created_at":"2026-05-05T14:34:22.805Z","updated_at":"2026-05-05T14:34:24.145Z","avatar_url":"https://github.com/redneckz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @redneckz/uni-jsx\n\nUnification layer between `React`, `Preact` and `Vue3`. Write React-like unified components and use everywhere without recompilation.\n\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Bundle size][bundlephobia-image]][bundlephobia-url]\n\n`React` as well as `Vue3` comes with `Virtual DOM` and `JSX` approaches.\nThere are a few differences at the low level.\n\nThis nano-library negates the differences between them on `JSX` level.\nMaking it possible to implement universal components that work without recompiling in both `React` and `Vue3`.\n\nAlso the following React-like core hooks are available for `Vue3`:\n\n- `useState`\n- `useEffect`\n- `useLayoutEffect`\n- `useCallback`\n- `useMemo`\n- `useRef`\n\nAdditional reusable hooks:\n\n```ts\nconst [value, { setValue, setTrue, setFalse, toggle }] = useBool(false);\nconst [list, { setList, push, pop, remove, clear }] = useList([]);\nconst [dict, { setDict, setItem, removeItem, assign, unassign, clear }] = useDict({});\n\n// See useSWR\nconst { data, error } = useAsyncData(key, fetcher, { fallback, cache });\n\nuseEventListener(target, 'eventType', handler);\n\n// Useful for popups\nconst targetRef = useOutsideClick(handleOutsideClick);\n\nconst globalLibrary = useScript('globalName', 'https://some/script.js');\n```\n\n## Workspaces\n\n- [uni-jsx/](./uni-jsx/README.md) Unified JSX core library\n- [demo/ui-kit](./demo/ui-kit/README.md) package with an example of unified components\n- [demo/vue-demo](./demo/vue-demo/README.md) `Vue3` app which uses components from `demo/ui-kit`\n- [demo/react-demo](./demo/react-demo/README.md) `React` app which uses components from `demo/ui-kit`\n- [demo/nuxt-demo](./demo/nuxt-demo/README.md) `Nuxt 3` app which uses components from `demo/ui-kit`\n- [demo/next-demo](./demo/next-demo/README.md) `Next.js` app which uses components from `demo/ui-kit`\n- [demo/preact-demo](./demo/preact-demo/README.md) `Preact` app which uses components from `demo/ui-kit`\n\n## How-to start demo\n\nInstall and build:\n\n```shell\n$ npm i # install deps\n$ npm run build\n```\n\nReact demo:\n\n```shell\n$ npm run start:react # http://localhost:8080\n```\n\nVue demo:\n\n```shell\n$ npm run start:vue # http://localhost:8090\n```\n\nNext demo:\n\n```shell\n$ npm run start:next # http://localhost:8070\n```\n\nNuxt demo:\n\n```shell\n$ npm run start:nuxt # http://localhost:8060\n```\n\nPreact demo:\n\n```shell\n$ npm run start:preact\n```\n\n## How to use\n\n[Documentation](uni-jsx/README.md)\n\n## Limitations\n\nCommon limitations:\n\n- Events are streamed up as-is (avoid usage of normalized Event fields specific to `React` or `Vue`)\n\nReact specific limitations:\n\n- NO refs forwarding\n\n# License\n\n[MIT](http://vjpr.mit-license.org)\n\n[npm-image]: https://badge.fury.io/js/%40redneckz%2Funi-jsx.svg\n[npm-url]: https://www.npmjs.com/package/%40redneckz%2Funi-jsx\n[build-image]: https://github.com/redneckz/uni-jsx/actions/workflows/main.yml/badge.svg\n[build-url]: https://github.com/redneckz/uni-jsx/actions/workflows/main.yml\n[bundlephobia-image]: https://badgen.net/bundlephobia/min/@redneckz/uni-jsx\n[bundlephobia-url]: https://bundlephobia.com/result?p=@redneckz/uni-jsx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredneckz%2Funi-jsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredneckz%2Funi-jsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredneckz%2Funi-jsx/lists"}