leoreyesdev

  • Guide to Using Promises and Async/Await in JavaScript and ReactJS

    Guide to Using Promises and Async/Await in JavaScript and ReactJS

    This guide provides best practices for using Promises and async/await in JavaScript and ReactJS, including examples of consuming REST APIs and tracking errors. The guide will be structured as follows: 1. Introduction to Promises Promises in JavaScript provide a way to handle asynchronous operations. A Promise represents a value that may be available now, or…

  • Day 7: Final Touches and Create tests for some components

    Day 7: Final Touches and Create tests for some components

    For testing the Vue component, we can utilize the Vue Test Utils and Jest. Vue Test Utils allows for mounting Vue components in isolation and simulating user interactions, while Jest can be used for assertions to ensure everything is working as expected. Firstly, set up your Vue project to use Jest (assuming you’re using Vue…

  • Day 5: Integrating Frontend with Backend

    Day 5: Integrating Frontend with Backend

    Create axiosConfig.js Modify api-be.js Create vue file ItemsCallFromAxios.vue Modify router with previous file Add this line on App.vue if you have checkout exercise complete https://github.com/LeoReyesDev/vue-tutorial/tree/day05-sample