Last active
June 21, 2022 14:20
-
-
Save joeldenning/1765cb979dbee452821715633eb39d47 to your computer and use it in GitHub Desktop.
single-spa-react parcel example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Parcel} from 'single-spa-react/parcel' | |
import parcelConfig from './other-file.js' | |
import {mountRootParcel} from 'single-spa' | |
function MyReactComponent(props) { | |
// The parcelConfig could be implemented in Angular, Vue, or anything else, | |
// but it works inside of a React component! | |
return ( | |
<div> | |
Lets render a parcel with jsx! | |
<Parcel | |
config={parcelConfig} | |
wrapWith="div" | |
mountParcel={mountRootParcel} | |
foo="bar" | |
/> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can define types in your repo: single-spa/single-spa-react#44 (comment)