Skip to content

Instantly share code, notes, and snippets.

@joeldenning
Last active June 21, 2022 14:20
Show Gist options
  • Save joeldenning/1765cb979dbee452821715633eb39d47 to your computer and use it in GitHub Desktop.
Save joeldenning/1765cb979dbee452821715633eb39d47 to your computer and use it in GitHub Desktop.
single-spa-react parcel example
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>
)
}
@Krzyrok
Copy link

Krzyrok commented Feb 18, 2020

you can define types in your repo: single-spa/single-spa-react#44 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment