Chapter 4

Using Data and Reactivity

IN THIS CHAPTER

Bullet Passing and using props

Bullet Binding attributes

Bullet Defining and working with reactive data

Bullet Making primitive data types reactive with ref()

Bullet Using computed properties

Bullet Watching for changes

“We're entering a new world in which data may be more important than software.”

—TIM O'REILLY

Passing data between components and using reactive state are the two ways that the display of a component can change. As in React, every rerendering of a Vue app's components starts with a change to state data. Vue tracks reactive state variables and triggers an update of the component containing the reactive data, which may cause new props to be passed to child components and thus modify how they render.

Passing and Using Props

When you write a custom Vue component and import it into another component, the name you used to import the component becomes available ...

Get JavaScript All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.