Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react): React docs toolkit for opentiny。 #106

Closed
wants to merge 3 commits into from

Conversation

pe-3
Copy link

@pe-3 pe-3 commented Sep 21, 2023

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Render react components in vue project with web components;

function App(props){
    return (<div>{props.children}</div>)
}
function TinyButton(){
}

class WebComp extends HTMLElment {
     connnectCallback(){
           ReactDOM.render(
               <App>
                  <TinyButton/>
               </App>
           )
     }
}
<template>
  <button-click-demo></button-click-demo>
</template>

<script>
// 导入的是编译后的产物
import ButtonClick from "@/webcomps/button/button-click-webcomp.js";
customElements.define("button-click-demo", ButtonClick);
export default {};
</script>

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@kagol
Copy link
Member

kagol commented Mar 28, 2024

@pe-3 可以截图看下效果哈~

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@pe-3 You can take a screenshot to see the effect~

@pe-3 pe-3 closed this Mar 29, 2024
@pe-3
Copy link
Author

pe-3 commented Mar 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants