Posts

Showing posts with the label VueJs

What are life cycle hooks in VueJs?

beforeCreate -  The first component in the creation of hooks. This allows us to perform actions before our component has been added to DOM. We don't have access to DOM inside of this hook. Created  -This hook is invoked when Vue has set up events and data observations. Here, events are active and access to reactive data is enabled through templates that have not yet been mounted or rendered. beforeMount -  The beforeMount hooks runs right before the initial render happens and after the template or render functions have complied. Mounted  - This is a most used hook and you will have full access to the reactive component, templates, and rendered DOM (via. this.$el). The most frequently used patterns are fetching data for your component. beforeUpdate -  This hook runs after data changes on our component and the update cycle begins. But it runs right before the DOM is patched and re-renders. Updated  - This hook runs after data changes on your component and the DOM re-renders.

VueJs basic interview questions?

What are life cycle hooks in VueJs? beforeCreate - The first component in the creation hooks. This allows us to perform actions before our component has been added to DOM. We don't have access to DOM inside of this hook. Created -This hook is invoked when Vue has set up events and data observation. Here, events are active and access to reactive data is enabled though templates have not yet been mounted or rendered. beforeMount - The beforeMount hooks runs right before the initial render happens and after the template or render functions have been complied. Mounted - This is a most used hook and you will have full access to the reactive component, templates, and rendered DOM (via. this.$el). The most frequently used patterns are fetching data for your component. beforeUpdate - This hook runs after data changes on our component and the update cycle begins. But it runs right before the DOM is patched and re-renders. Updated - This hook runs after data changes on your compo