← 返回首页
asyncapi-react/docs/usage/vue.md at next · asyncapi/asyncapi-react · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
49 lines (35 loc) · 1.29 KB
 next
Top

File metadata and controls

  • Preview
  • Code
  • Blame
49 lines (35 loc) · 1.29 KB

Using in Vue

If you wanna use the React AsyncAPI component in your Vue project, you may want to use the AsyncApiStandalone bundle with React and ReactDom onboard.

Prerequisites

First read the Readme document and install the React AsyncAPI component by:

npm install --save @asyncapi/react-component

Usage

To use component in Angular, follow these steps:

  1. Import @asyncapi/react-component/browser/standalone bundle and create similar component as below:
<template> <div ref="asyncapi"></div> </template> <script> import AsyncApiStandalone from '@asyncapi/react-component/browser/standalone'; const schema = `...`; // AsyncAPI specification, fetched or pasted. const config = {}; // Configuration for component. This same as for normal React component. export default { name: 'AsyncApiComponent', props: { msg: String }, mounted() { const container = this.$refs.asyncapi; AsyncApiStandalone.render({ schema, config }, container); } } </script>
  1. Copy styles @asyncapi/react-component/styles/default.min.css to assets/asyncapi.min.css and import in component as:

    <style scope src="@/assets/asyncapi.min.css"></style>
  2. Use the component in your application.

Footer

© 2026 GitHub, Inc.