{"id":23854973,"url":"https://github.com/ara-framework/nova-react-bridge","last_synced_at":"2025-06-29T09:32:59.117Z","repository":{"id":48321406,"uuid":"202060019","full_name":"ara-framework/nova-react-bridge","owner":"ara-framework","description":"Nova Bridge for React","archived":false,"fork":false,"pushed_at":"2022-12-02T22:42:38.000Z","size":189,"stargazers_count":5,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-27T23:40:49.359Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nova-react-bridge","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/ara-framework.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}},"created_at":"2019-08-13T03:50:41.000Z","updated_at":"2023-09-06T15:59:29.000Z","dependencies_parsed_at":"2022-08-20T09:40:58.012Z","dependency_job_id":null,"html_url":"https://github.com/ara-framework/nova-react-bridge","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ara-framework/nova-react-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fnova-react-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fnova-react-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fnova-react-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fnova-react-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ara-framework","download_url":"https://codeload.github.com/ara-framework/nova-react-bridge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ara-framework%2Fnova-react-bridge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262361611,"owners_count":23299084,"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:31.888Z","updated_at":"2025-06-29T09:32:59.070Z","avatar_url":"https://github.com/ara-framework.png","language":"JavaScript","readme":"# Nova React Bridge\n\nThis package contains a React component named `Nova` that renders a placeholder also known as [Nova Directive](https://github.com/ara-framework/ara-cli/wiki)\n\nRendered placeholder:\n\n```html\n\u003cdiv data-hypernova-key=\"NavBar\" data-hypernova-id=\"d0a0b082-dad0-4bf2-ae4f-08eff16575b4\"\u003e\u003c/div\u003e\n\u003cscript type=\"application/json\" data-hypernova-key=\"NavBar\" data-hypernova-id=\"d0a0b082-dad0-4bf2-ae4f-08eff16575b4\"\u003e\u003c!--{\"brand\":\"Ara Framework\",\"links\":[{\"url\":\"https://github.com/ara-framework\",\"text\":\"Github\"}]}--\u003e\u003c/script\u003e\n\n```\n\nOn **Client-Side Rendering** the placeholder is where the component is going to be mounted or hydrated depending on the framework or library.\n\nOn **Server-Side Rendering** the placeholder is used by [Nova Proxy](https://github.com/ara-framework/nova-proxy) or [Nova Static](https://github.com/ara-framework/nova-static) to Server-Side Include the HTML rendered by [Hypernova](https://github.com/airbnb/hypernova).\n\n## Install\n\n```\nnpm install nova-react-bridge\n```\n\n## Usage\n\nThe `Nova` component requires the props `name` and `data`\n\n- `name` is the registered view in Hypernova.\n- `data` is the data necessary to render the view.\n\n```jsx\nimport { Nova } from 'nova-react-bridge'\n\nconst Page = () =\u003e (\n  \u003cdiv\u003e\n    \u003cNova \n      name=\"NavBar\"\n      data={{ brand: 'Ara Framework', links: [{ url: 'https://github.com/ara-framework', text: \"Github\" }]}}\n    /\u003e\n  \u003c/div\u003e\n)\n```\n\n### Mounting Hypernova Client Component\n\nThe `Nova` component emits a custom event called `NovaMount` on the `document` when the React component is mounted. The event needs to be listened by the Hypernova's client script in order to mount the view when the placeholder is ready.\n\n```js\nimport { renderClient } from 'hypernova-redom'\n\ndocument.addEventListener('NovaMount', (event) =\u003e {\n  const { detail: { name, id } } = event\n  if (name === 'NavBar') {\n    return renderClient(name, NavBar, id)\n  }\n})\n```\n\nThe example above is using the method `renderClient` from `hypernova-redom`, this method should be available for the other supported [bindings](https://github.com/ara-framework/ara-cli/wiki/Supported-Hypernova-Bindings).\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fara-framework%2Fnova-react-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fara-framework%2Fnova-react-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fara-framework%2Fnova-react-bridge/lists"}