Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

6
Reusing a component with an action
Post Body

I'm coming from a React background and I want to implement the reuse of a component. This component has an action that essentially requires an ID to be passed into the action.

Let's say there are two pages. Each page lists items. How should I implement a component (a button) that can be used to add the item for each page. In React, we would normally just pass the function of that component to the button component. But I read this is not the way in Vue. So what's the best way to achieve this?

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
12,499
Link Karma
2,188
Comment Karma
10,210
Profile updated: 3 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago