Assigning data in using x-init of alpine are not applied #690
PetroGromovo
started this conversation in
4. General
Replies: 1 comment
-
@PetroGromovo Please define the function addTodos() {
return {
todos: [],
initTodos() {
// ... put method here
}
}
} |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hello,
With [email protected] and axios": "^0.19.2 I try to get data using x-init, as I
read here https://github.com/alpinejs/alpine with code :
in the console I see that addTodos with data declaration is run firstly and initTodos() with data
retrieved from db : https://imgur.com/a/zSj23Ad
but my listing is empty. If to uncomment 2 lines inside of function addTodos( - I see these rows,
but not returned from db.
What is wrong ?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions