File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ This is anywhere your data or business logic comes from. If your view model is a
1818
1919#### View
2020
21- 1 . Located in [ ` shared-components ` ] ( https://github.com/element-hq/element-web/tree/develop/src /shared-components ) . Develop it in storybook!
21+ 1 . Located in [ ` shared-components ` ] ( https://github.com/element-hq/element-web/tree/develop/packages /shared-components ) . Develop it in storybook!
22222 . Views are simple react components (eg: ` FooView ` ).
23233 . Views use [ useSyncExternalStore] ( https://react.dev/reference/react/useSyncExternalStore ) internally where the view model is the external store.
24244 . Views should define the interface of the view model they expect:
@@ -35,7 +35,7 @@ This is anywhere your data or business logic comes from. If your view model is a
3535 }
3636
3737 // ViewModel is a type defining the methods needed for `useSyncExternalStore`
38- // https://github.com/element-hq/element-web/blob/develop/src /shared-components/ViewModel.ts
38+ // https://github.com/element-hq/element-web/blob/develop/packages /shared-components/src /ViewModel.ts
3939 type FooViewModel = ViewModel <FooViewSnapshot > & FooViewActions ;
4040
4141 interface FooViewProps {
@@ -54,7 +54,7 @@ This is anywhere your data or business logic comes from. If your view model is a
5454 ```
5555
56565. Multiple views can share the same view model if necessary .
57- 6. A full example is available [here ](https :// github.com/element-hq/element-web/blob/develop/src /shared-components/audio/AudioPlayerView/AudioPlayerView.tsx)
57+ 6. A full example is available [here ](https :// github.com/element-hq/element-web/blob/develop/packages /shared-components/src /audio/AudioPlayerView/AudioPlayerView.tsx)
5858
5959#### View Model
6060
You can’t perform that action at this time.
0 commit comments