Replies: 2 comments 5 replies
-
You need to post your component otherwise it's impossible to debug. Are you initializing properties in x-init by any chance? Do you have a sensible default before it's ready (an empty array)? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here's the component, yes I'm already initializing <script>
document.addEventListener("alpine:init", () => {
Alpine.data("propertiesData", () => ({
properties: [],
...
async init() {
const res = await fetch(`${location.origin}/json/properties.json`)
const data = await res.json()
this.properties = data.properties
}
}))
})
</script>
<div x-data="propertiesData">
<template x-for="property in properties">...</template>
</div> |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm getting this error, however properties are available in
x-data
. In local development it is working fineAny pointers to why this is happening?
Thanks 🙏
Beta Was this translation helpful? Give feedback.
All reactions