How reactivity works in Vuejs


One of the interesting thing about all these JavaScript Frameworks is reactivity of components. Each framework have their own way to treat us.

Problem

Suppose you have a counter that increment when user click it will increase by itself. So each time user click on it, the UI should update, it should reloaded the page/UI.

Solution

This problem have one solution, binding. Vuejs allow us bind members of the component.

<template>
<div >     
   {{counter}}
</div>
</template>

Published by

Manoj

A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.