{"id":23854987,"url":"https://github.com/ara-framework/hypernova-hyperapp","last_synced_at":"2025-04-14T03:24:59.749Z","repository":{"id":48313911,"uuid":"193306964","full_name":"ara-framework/hypernova-hyperapp","owner":"ara-framework","description":"Hyperapp bindings for Hypernova","archived":false,"fork":false,"pushed_at":"2021-08-02T05:53:29.000Z","size":9,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T17:22:34.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/hypernova-hyperapp","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/ara-framework.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":"2019-06-23T04:41:24.000Z","updated_at":"2024-02-23T12:29:02.000Z","dependencies_parsed_at":"2022-08-19T03:00:37.206Z","dependency_job_id":null,"html_url":"https://github.com/ara-framework/hypernova-hyperapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fhypernova-hyperapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fhypernova-hyperapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fhypernova-hyperapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fhypernova-hyperapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ara-framework","download_url":"https://codeload.github.com/ara-framework/hypernova-hyperapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814528,"owners_count":21165781,"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":"2025-01-03T00:19:34.741Z","updated_at":"2025-04-14T03:24:59.730Z","avatar_url":"https://github.com/ara-framework.png","language":"JavaScript","readme":"# hypernova-hyperapp  \n\n[Hyperapp](https://github.com/jorgebucaran/hyperapp) bindings for [Hypernova](https://github.com/airbnb/hypernova).\n\nOn the server, wraps the component in a function to render it to a HTML string given its props.\n\nOn the client, calling this function with your component scans the DOM for any server-side rendered instances of it. It then resumes those components using the server-specified props.\n\n## Install\n\n```sh\nnpm install hypernova-hyperapp\n```\n\n## Stateful components\n\n```js\nconst Example = ({ items, term }) =\u003e (\n  \u003cdiv\u003e\n    \u003cstrong\u003e{ term }\u003c/string\u003e\n    \u003cul\u003e\n      {\n        items.map(item =\u003e (\n          \u003cli\u003e{item}\u003c/li\u003e\n        ))\n      }\n    \u003c/ul\u003e\n  \u003c/div\u003e\n)\n\nexport default {\n  init: (props) =\u003e {\n    // init state based on props\n    const state = {\n      title: props.title\n    }\n\n    return state\n  },\n  nova: {\n    beforeCreate: async (props) =\u003e {\n      const newProps = { ...props }\n      if (typeof window === 'undefined') {\n        /* fetch content and mutate original props */\n        const items = await content.search(props.term)\n        newProps.items = items\n      }\n      return newProps\n    }\n  },\n  view: Example\n}\n```\n\n## Usage\n\nHere's how to use it in your module:\n\n```js\nimport { renderHyperapp } from 'hypernova-hyperapp'\nimport Example from './components/Example'\n\nexport default renderHyperapp('Example', Example)\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fara-framework%2Fhypernova-hyperapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fara-framework%2Fhypernova-hyperapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fara-framework%2Fhypernova-hyperapp/lists"}