1 year ago

Data shows in Console, but not in the View

Posted 1 year ago by WallyJ

Simple query via

    <tr v-for="user in users" v-bind:key="user.id">

    export default {
        data() {
            return {
                users : {}
        methods: {
            loadUsers() {
                axios.get("api/user").then(({ data }) => (this.users = data.data));

        created() {
        mounted() {
            console.log('Component mounted.')

When I load the view I get no errors on page or in the console. I can see the user array in the Network tab, click on it and choose "Preview" to see the first record of data, so I know the query is working.

But the data doesn't show on the page.

I look at the elements on the page and see:


The table opens and closes with nothing in it.

For some reason the v-for is not loading the data, but it isn't producing a visible error either.

What am I missing? Thanks!

Please sign in or create an account to participate in this conversation.