Small typo in readme
Closed this issue · 1 comments
dylanjcastillo commented
Hey @ilikerobots,
Been trying your tutorial and guides. Super useful stuff.
Just wanted to let you know that you have a small typo in the last line of the example in the readme:
import DjangoUtilsPlugin from 'vue-plugin-django-utils'
import {convertDatasetToProps} from 'vue-plugin-django-utils'
const rootEl = document.getElementById('my-root')
if (rootEl) {
// Create app, passing the root element dataset as rootProp values
const app = createApp(MyRootComponent, convertDatasetToProps({
dataset: {...rootEl.dataset},
component: MyRootComponent
}))
// Use additional plugin capabilities, including
// 1) Django CSRF token provided as as 'csrfToken'
// 2) Provide any key-value pairs in window.vueProvided
// 3) Attached outerHTML of child elements w/ attribute data-django-slot=slotName in globalProperties.$djangoSlots
app.use(DjangoUtilsPlugin, {rootElement: rootEl})
app.mount(statusEl) // <-- This should be rootEl right?
}
ilikerobots commented
yep, thanks!