{"id":14981996,"url":"https://github.com/streamich/jsx-plus-plus","last_synced_at":"2025-04-10T04:58:56.543Z","repository":{"id":31191423,"uuid":"127173767","full_name":"streamich/jsx-plus-plus","owner":"streamich","description":"Better JSX for busy developers","archived":false,"fork":false,"pushed_at":"2025-04-02T20:42:45.000Z","size":140,"stargazers_count":46,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T21:34:29.819Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-03-28T17:15:39.000Z","updated_at":"2025-03-29T00:55:42.000Z","dependencies_parsed_at":"2023-12-20T11:59:52.089Z","dependency_job_id":"cd262d50-78ab-42cd-9a60-1e2a1403d8ac","html_url":"https://github.com/streamich/jsx-plus-plus","commit_stats":{"total_commits":481,"total_committers":4,"mean_commits":120.25,"dds":0.5322245322245323,"last_synced_commit":"b462bb7b375e8f89fbf0d9ce8e758f3c3676654c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fjsx-plus-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fjsx-plus-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fjsx-plus-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamich%2Fjsx-plus-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamich","download_url":"https://codeload.github.com/streamich/jsx-plus-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161265,"owners_count":21057554,"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-09-24T14:04:37.736Z","updated_at":"2025-04-10T04:58:56.506Z","avatar_url":"https://github.com/streamich.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSX++\n\nMissing features for your React JSX templates.\n\n- Inline style prefixing\n- Better class name syntax\n- Dynamic CSS \u0026mdash; [*demo!*](https://codesandbox.io/s/ryoy53q4mn)\n- Set DOM element props \u0026mdash; [*demo!*](https://codesandbox.io/s/535k08vwm4)\n- Set DOM element attributes\n- Add native DOM event listeners \u0026mdash; [*demo!*](https://codesandbox.io/s/2wlvo21yp0)\n- Micro life-cycles\n\n\nUsage:\n\n```js\nrequire('jsx-plus-plus');\n```\n\nDone!\n\n\n## Inline Style Prefixing\n\nAuto-prefixes inline styles, uses only required prefixes by your browser.\n\n```jsx\n\u003cdiv style={{hyphens: 'auto'}} /\u003e\n```\n\nResult:\n\n```html\n\u003cdiv style=\"-webkit-hyphens: auto\"\u003e\n```\n\n\n## Better Class Names\n\nSet class names using either `class` or `className` props. Use [`classnames`](https://www.npmjs.com/package/classnames)\nsyntax.\n\n```jsx\n\u003cdiv class={[null, false, 'bar', undefined, 0, 1, { baz: null }, '']} /\u003e\n\u003cdiv className={{a: true, b: false}}\u003e\n```\n\nResult:\n\n```html\n\u003cdiv class=\"bar 1\"\u003e\n\u003cdiv class=\"a\"\u003e\n```\n\n\n## Dynamic CSS\n\nJSX++ will dynamically generate scoped CSS for your nodes.\n\n```jsx\n\u003cdiv $css={{\n    color: 'red', \n    '\u0026:hover': {\n        color: 'blue'\n    }\n}}\u003eHover me!\u003c/div\u003e\n```\n\nResult:\n\n```css\n[data-css-123] {\n    color: red;\n}\n[data-css-123]:hover {\n    color: blue;\n}\n```\n\n```html\n\u003cdiv data-css-123\u003eHover me!\u003c/div\u003e\n```\n\n\n## DOM Element Props\n\nSets props on native DOM elements.\n\n```jsx\n\u003cdiv $dom={{innerHTML: 'foobar'}} /\u003e\n```\n\nResult:\n\n```html\n\u003cdiv\u003efoobar\u003c/div\u003e\n```\n\n\n## DOM Element Attributes\n\nSets attributes of DOM elements.\n\n```jsx\n\u003cdiv $attr={{'aria-hidden': ''}} /\u003e\n```\n\nResult:\n\n```html\n\u003cdiv aria-hidden=\"\"\u003e\u003c/div\u003e\n```\n\n\n## Native DOM Events\n\nAdd listeners to native DOM events.\n\n```jsx\n\u003cbutton $on={{click: (event) =\u003e console.log('CLICKED')}}\u003eClick me!\u003c/button\u003e\n```\n\n\n## Micro Life-cycles\n\nAdd micro life-cycles to React DOM string elements.\n\n```jsx\n\u003cdiv\n  $attach={(el, props) =\u003e console.log('element attached: ', el, props)}\n  $update={(el, props, oldProps) =\u003e console.log('element updated: ', el, props, oldProps)}\n  $detach={(el, oldProps) =\u003e console.log('element detached: ', el, oldProps)}\n/\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fjsx-plus-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamich%2Fjsx-plus-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamich%2Fjsx-plus-plus/lists"}