{"id":23762168,"url":"https://github.com/rosylilly/react-jsx-renderer","last_synced_at":"2025-09-05T06:31:48.591Z","repository":{"id":38014996,"uuid":"370839055","full_name":"rosylilly/react-jsx-renderer","owner":"rosylilly","description":"A React component for Rendering JSX","archived":false,"fork":false,"pushed_at":"2022-06-20T16:31:28.000Z","size":10890,"stargazers_count":48,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-28T06:30:32.051Z","etag":null,"topics":["jsx","react","renderer","template"],"latest_commit_sha":null,"homepage":"https://aduca.org/react-jsx-renderer/","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/rosylilly.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":"2021-05-25T22:04:48.000Z","updated_at":"2025-08-06T02:13:20.000Z","dependencies_parsed_at":"2022-08-24T20:20:33.870Z","dependency_job_id":null,"html_url":"https://github.com/rosylilly/react-jsx-renderer","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/rosylilly/react-jsx-renderer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosylilly%2Freact-jsx-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosylilly%2Freact-jsx-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosylilly%2Freact-jsx-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosylilly%2Freact-jsx-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosylilly","download_url":"https://codeload.github.com/rosylilly/react-jsx-renderer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosylilly%2Freact-jsx-renderer/sbom","scorecard":{"id":785336,"data":{"date":"2025-08-11","repo":{"name":"github.com/rosylilly/react-jsx-renderer","commit":"fc825c8a405bb58bd5476c9a1820bac36d6c7200"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/latest.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/latest.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/latest.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/latest.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/latest.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/latest.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/nightly.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/nightly.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/nightly.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/rosylilly/react-jsx-renderer/test.yml/main?enable=pin","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/latest.yml:1","Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: no topLevel permission defined: .github/workflows/nightly.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"59 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-xq7p-g2vc-g82p","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-7hpj-7hhx-2fgx","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-3949-f494-cm99","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-3mv9-4h5g-vhg3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T05:56:58.030Z","repository_id":38014996,"created_at":"2025-08-23T05:56:58.030Z","updated_at":"2025-08-23T05:56:58.030Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273722724,"owners_count":25156300,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["jsx","react","renderer","template"],"created_at":"2024-12-31T21:16:48.343Z","updated_at":"2025-09-05T06:31:47.972Z","avatar_url":"https://github.com/rosylilly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React JSX Renderer\n\n[![npm (latest)](https://img.shields.io/npm/v/react-jsx-renderer/latest)](https://www.npmjs.org/package/react-jsx-renderer)\n[![npm (nightlyt)](https://img.shields.io/npm/v/react-jsx-renderer/nightly)](https://www.npmjs.com/package/react-jsx-renderer/v/nightly)\n\n[![demo](https://img.shields.io/badge/LIVE%20DEMO-available-success)](https://aduca.org/react-jsx-renderer/)\n[![Coverage Status](https://codecov.io/gh/rosylilly/react-jsx-renderer/branch/main/graph/badge.svg?token=notleiwHZC)](https://codecov.io/gh/rosylilly/react-jsx-renderer)\n[![Dependencies Status](https://status.david-dm.org/gh/rosylilly/react-jsx-renderer.svg)](https://david-dm.org/rosylilly/react-jsx-renderer)\n[![Install size](https://packagephobia.com/badge?p=react-jsx-renderer)](https://packagephobia.com/result?p=react-jsx-renderer)\n[![License: MIT](https://img.shields.io/npm/l/react-jsx-renderer)](https://opensource.org/licenses/MIT)\n\n[![latest](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/latest.yml/badge.svg)](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/latest.yml)\n[![nightly](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/nightly.yml/badge.svg)](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/nightly.yml)\n[![build](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/build.yml/badge.svg)](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/build.yml)\n[![test](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/test.yml/badge.svg)](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/test.yml)\n[![lint](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/lint.yml/badge.svg)](https://github.com/rosylilly/react-jsx-renderer/actions/workflows/lint.yml)\n\nA React Component for Rendering JSX.\n\n## Description\n\nReact JSX Renderer is a React Component for rendering JSX to React nodes.\n\nIt has a JavaScript Runtime inside, and can execute the user's JSX with controlled behavior.\n\n[Launch Demo](https://aduca.org/react-jsx-renderer/)\n\n## Features\n\n- [x] Rendering JSX as React nodes\n- [x] TypeScritpt ready\n- [x] Provides CommonJS and ES Modules\n- [x] JavaScript syntax and featues\n  - without async, await and generator\n- [x] Injectable custom React components\n- [x] Pass binding variables\n- [x] Applicable filters to parsed nodes\n  - You can create allowlist / denylist filters to tagName, attributes or properties\n- [x] Avoid user's call expressions\n- [x] Avoid user's new expressions\n- [x] Parse with [meriyah](https://github.com/meriyah/meriyah)\n\n## Installation\n\n1. `npm install -s react-jsx-renderer` (or `yarn add react-jsx-renderer`)\n2. Add `import { JSXRenderer } from 'react-jsx-renderer';`\n3. `\u003cJSXRenderer code=\"Hello, World\" /\u003e` to render `Hello, World`\n\n## Requirements\n\n- **React**: \u003e= 16.0.0\n\n## Options\n\n```typescript\ninterface ParseOptions {\n  /**\n   * Options of parser\n   */\n  meriyah?: meriyah.Options;\n\n  /**\n   * When this option is enabled, always parse as an expression.\n   */\n  forceExpression?: boolean;\n}\n\ninterface EvaluateOptions {\n  /**\n   * binding\n   */\n  binding?: Binding;\n\n  /**\n   * components\n   */\n  components?: ComponentsBinding;\n\n  /**\n   * Prefix of generated keys.\n   */\n  keyPrefix?: string;\n\n  /**\n   * When this option is enabled, no key will be generated\n   */\n  disableKeyGeneration?: boolean;\n\n  /**\n   * When this option is enabled, bindings will be excluded from the component search.\n   */\n  disableSearchCompontsByBinding?: boolean;\n\n  /**\n   * When this option is enabled, Call Expression and New Expression will always return undefined.\n   */\n  disableCall?: boolean;\n\n  /**\n   * When this option is enabled, New Expression will always return undefined.\n   */\n  disableNew?: boolean;\n\n  /**\n   * When this option is enabled, access to undefined variables will raise an exception.\n   */\n  raiseReferenceError?: boolean;\n\n  /**\n   * List of functions allowed to be executed.\n   *\n   * If empty, all functions will be allowed to execute.\n   */\n  allowedFunctions?: AnyFunction[];\n\n  /**\n   * Add user-defined functions to the allowed list.\n   */\n  allowUserDefinedFunction?: boolean;\n\n  /**\n   * List of functions denied to be executed.\n   *\n   * If empty, all functions will be allowed to execute.\n   */\n  deniedFunctions?: AnyFunction[];\n}\n\ninterface RenderingOptions {\n  /**\n   * List of filters to be applied to elements.\n   */\n  elementFilters?: JSXElementFilter[];\n\n  /**\n   * List of filters to be applied to fragments.\n   */\n  fragmentFilters?: JSXFragmentFilter[];\n\n  /**\n   * List of filters to be applied to text nodes.\n   */\n  textFilters?: JSXTextFilter[];\n\n  /**\n   * When this option is enabled, non-existent HTML elements will not be rendered.\n   */\n  disableUnknownHTMLElement?: boolean;\n\n  /**\n   * Function to determine Unknown HTML Element\n   */\n  isUnknownHTMLElementTagName?: UnknownHTMLElementTagNameFunction;\n}\n\ninterface RendererOptions extends {\n  /**\n   * JSX code\n   */\n  code?: string;\n\n  /**\n   * The component that will be displayed instead when an error occurs.\n   */\n  fallbackComponent?: JSXFallbackComponent;\n\n  /**\n   * If you want to receive the parsed result, set a Ref object to this option.\n   */\n  refNodes?: Ref\u003cJSXNode[]\u003e;\n}\n```\n\n## Usage\n\n### Using like a simple HTML template engine\n\ninput:\n\n```javascript\nimport { render } from 'react-dom';\nimport { JSXRenderer } from 'react-jsx-renderer';\n\nconst root = document.getElementById('root');\n\nrender(\n  \u003cJSXRenderer\n    binding={{ name: 'Sho Kusano' }}\n    code={'\u003cp\u003eHello, {name}\u003c/p\u003e'}\n  /\u003e,\n  root\n);\n```\n\nto:\n\n```html\n\u003cp\u003eHello, Sho Kusano\u003c/p\u003e\n```\n\n### Using JSX with JavaScript expressions\n\ninput:\n\n```javascript\nrender(\n  \u003cJSXRenderer\n    binding={{\n      three: 3,\n      seven: 7,\n    }}\n    code={\n      '\u003cp\u003e+ {three + seven}\u003c/p\u003e' +\n      '\u003cp\u003e- {three - seven}\u003c/p\u003e' +\n      '\u003cp\u003ebitwise shift {three \u003c\u003c seven}\u003c/p\u003e'\n    }\n  /\u003e,\n  root\n);\n```\n\nto:\n\n```html\n\u003cp\u003e+ 10\u003c/p\u003e\n\u003cp\u003e- -4\u003c/p\u003e\n\u003cp\u003ebitwise shift 384\u003c/p\u003e\n```\n\n### Using JSX with your favorite custom components\n\n```javascript\nconst Red = ({ children }) =\u003e \u003cb style={{ color: 'red' }}\u003e{children}\u003c/b\u003e\n\nrender(\n  \u003cJSXRenderer\n    components={{ RedColor: Red }}\n    code={'\u003cp\u003e\u003cRedColor\u003ered\u003c/RedColor\u003e\u003c/p\u003e'}\n  /\u003e,\n  root\n);\n```\n\nto:\n\n```html\n\u003cp\u003e\u003cb style=\"color: red\"\u003ered\u003c/b\u003e\u003c/p\u003e\n```\n\n### Convert JSX with filters\n\n```javascript\nconst hrefFilter = (element: JSXElement) =\u003e {\n  const { props, component, children } = element;\n  if (component !== 'a') return element;\n\n  let href = props.href || '';\n  if (href.includes('//')) {\n    href = secureURLConvert(href); // Add prefix https://secure.url/redirect?url=\n  }\n  const filteredProps = { ...props, href };\n  return { component, children, props: filteredProps };\n}\n\nrender(\n  \u003cJSXRenderer\n    elementFilters={[hrefFilter]}\n    code={\n      '\u003cp\u003e\u003ca href=\"/\"\u003eroot\u003c/a\u003e\u003c/p\u003e' +\n      '\u003cp\u003e\u003ca href=\"../\"\u003eupper directory\u003c/a\u003e\u003c/p\u003e' +\n      '\u003cp\u003e\u003ca href=\"subdir\"\u003esub directory\u003c/a\u003e\u003c/p\u003e' +\n      '\u003cp\u003e\u003ca href=\"https://github.com/\"\u003egithub\u003c/a\u003e\u003c/p\u003e' +\n    }\n  /\u003e,\n  root\n);\n```\n\nto:\n\n```html\n\u003cp\u003e\u003ca href=\"/\"\u003eroot\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"../\"\u003eupper directory\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"subdir\"\u003esub directory\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://secure.url/redirect?url=https://github.com\"\u003egithub\u003c/a\u003e\u003c/p\u003e\n```\n\n### Provide options by context\n\nex: Server side rendering.\n\n```javascript\nimport { JSDOM } from 'jsdom';\n\nrender(\n  \u003cJSXRendererOptionsProvider isUnknownHTMLElement={(tagName) =\u003e {\n    const { window } = new JSDOM();\n    return window.document.createElement(tagName) instanceof window.HTMLUnknownElement;\n  }}\u003e\n    \u003cJSXRenderer\n      code={\n        '\u003cp\u003e\u003cunknown\u003eAvoid\u003c/unknown\u003e\u003c/p\u003e'\n      }\n    /\u003e\n  \u003c/JSXRendererOptionsProvider\u003e,\n  root\n);\n```\n\nto:\n\n```html\n\u003cp\u003e\u003c/p\u003e\n```\n\n## License\n\n[MIT License](https://github.com/rosylilly/react-jsx-renderer/blob/main/LICENSE)\n\n## Related projects\n\n- [react-jsx-parser](https://github.com/TroyAlford/react-jsx-parser)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosylilly%2Freact-jsx-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosylilly%2Freact-jsx-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosylilly%2Freact-jsx-renderer/lists"}