Samples code

Welcome to the Code Samples section of our blog – a curated space dedicated exclusively to illuminating practical snippets from the vast world of programming. Here, you will unearth hands-on examples spanning a spectrum of popular libraries and frameworks. Delve into the intricate webs of JavaScript (JS), explore the reactive realms of Vue and React, or venture into the dynamic domain of mobile development with React Native. Each sample is crafted to not only showcase best practices but to also elucidate the underlying principles and mechanics. Whether you’re a seasoned developer seeking inspiration or a beginner eager to understand, this section is designed with the intention to be your reliable repository of practical code know-how. So, embark on this journey of code exploration and let the power of practical implementation guide your learning!

You can find different fragments of code based in reactjs and JS, or another technologies and languages.

  • 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

  • React Hooks

    React Hooks

    React hooks are a powerful feature introduced in React 16.8, enabling developers to use state and other React features without writing a class. Here’s a list of some of the built-in React hooks with simple examples for each: 2. useEffect 3. useContext 4. useReducer 5. useCallback 6. useMemo 7. useRef 8. useLayoutEffect 9. useImperativeHandle 10.…

  • Day 2: Diving Deeper into Vue.js

    Day 2: Diving Deeper into Vue.js

    Components and Props: Components are one of the most powerful features of Vue. They help you extend basic HTML elements to encapsulate reusable code. 1. Create a new component: src/components/UserCard.vue: When prompted, select Vue 3. Navigate into your project: 2. Install Vue Router: 3. Set up Vue Router: src/router/index.js: 4. Create views: src/views/Home.vue: src/views/Profile.vue: 5.…

  • How create custom hook

    How create custom hook

    In the next post you can check simple sample, of can create your own custom hook, please check this below, and if you want check working click here