Skip to content

Commit

Permalink
show refactoring of components without changing props/actor refs
Browse files Browse the repository at this point in the history
  • Loading branch information
K3TH3R committed Jul 6, 2021
1 parent e98a76e commit 82aa72d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
An ongoing experiment in creating a centralized actor registry and event bus for XState.

To run, just clone the repo and then `yarn install && yarn dev`.

NOTE: The service worker implementation requires use of Chrome during development [see Vite's docs on web workers](https://vitejs.dev/guide/features.html#web-workers) for details.
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<BrowserStatus />
</div>
<div class="h-full w-full flex justify-center items-center">
<Display />
<Foo />
</div>
<Notifications />
</div>
Expand All @@ -26,13 +26,13 @@ import {
} from './machines/choreographer.machine'
import BrowserStatus from './components/browserStatus.vue'
import Notifications from './components/notifications.vue'
import Display from './components/display.vue'
import Foo from './components/foo.vue'
export default defineComponent({
components: {
BrowserStatus,
Notifications,
Display,
Foo,
},
setup() {
const app = useMachine(appMachine, {
Expand Down
15 changes: 15 additions & 0 deletions src/components/bar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div>
<Baz />
</div>
</template>

<script>
import Baz from './baz.vue'
export default {
components: {
Baz,
},
}
</script>
15 changes: 15 additions & 0 deletions src/components/baz.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div>
<Display />
</div>
</template>

<script>
import Display from './display.vue'
export default {
components: {
Display,
},
}
</script>
15 changes: 15 additions & 0 deletions src/components/foo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div>
<Bar />
</div>
</template>

<script>
import Bar from './bar.vue'
export default {
components: {
Bar,
},
}
</script>

0 comments on commit 82aa72d

Please sign in to comment.