Skip to content

Commit 3500a6b

Browse files
committed
Add styled components questions and answers
1 parent faaac52 commit 3500a6b

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ List of 300 VueJS Interview Questions
174174
|165| [How do you perform asynchronous operations?](#how-do-you-perform-asynchronous-operations)|
175175
|166| [What are differences between mutations and actions?](#what-are-differences-between-mutations-and-actions)|
176176
|167| [Give an example usage of actions?](#give-an-example-usage-of-actions?)|
177+
|168| [How do you dispatch actions?](#how-do-you-dispatch-actions)|
178+
|169| [Can you dispatch an action using payload or object?](#can-you-dispatch-an-action-using-payload-or-object)|
179+
|170| [Can I use styled components in vuejs?](#can-i-use-styled-components-in-vuejs)|
177180

178181
1. ### What is VueJS?
179182
**Vue.js** is an open-source, progressive Javascript framework for building user interfaces that aim to be incrementally adoptable. The core library of VueJS is focused on the `view layer` only, and is easy to pick up and integrate with other libraries or existing projects.
@@ -3040,4 +3043,25 @@ List of 300 VueJS Interview Questions
30403043
}
30413044
}
30423045
})
3043-
```
3046+
```
3047+
168. ### How do you dispatch actions?
3048+
Actions are simply triggered with the store.dispatch method as below,
3049+
```javascript
3050+
store.dispatch('increment')
3051+
```
3052+
169. ### Can you dispatch an action using payload or object style?
3053+
Yes, actions support both payload and object style format similar to mutations.
3054+
```javascript
3055+
// dispatch with a payload
3056+
store.dispatch('incrementAsync', {
3057+
amount: 10
3058+
})
3059+
3060+
// dispatch with an object
3061+
store.dispatch({
3062+
type: 'incrementAsync',
3063+
amount: 10
3064+
})
3065+
```
3066+
170. ### Can I use styled components in vuejs?
3067+
Styled components is basically used for ReactJS applications. If you want to use for VueJS applications, there is vuejs styled components library available under styled component library. VueJS Styled component is a javascript library for stying vuejs applications.

0 commit comments

Comments
 (0)