Commit 4c6b7ad3 authored by Cole Bemis's avatar Cole Bemis

Add vuex

parent 29abfc96
......@@ -3,7 +3,11 @@
</template>
<script>
import {mapState} from 'vuex';
export default {
name: 'App'
name: 'App',
components: {Icon},
computed: mapState(['icons'])
}
</script>
\ No newline at end of file
import Vue from 'vue';
import Vuex from 'vuex';
import App from './App';
const data = {
icons: [
'square',
'circle',
'rectangle-vertical',
'rectangle-horizontal'
]
};
const icons = [
'square',
'circle',
'rectangle-vertical',
'rectangle-horizontal'
];
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
icons
}
});
new Vue({
el: '#app',
store,
components: {App},
template: '<app/>'
});
// Vue.component('icon', {
// props: {
......@@ -55,9 +69,5 @@ const data = {
// template: '#icon-container-template'
// })
new Vue({
el: '#app',
data: data,
components: {App},
template: '<app/>'
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment