|
- import Storage from './Storage'
-
- type PluginConfig = {
- baseUrl: string,
- }
-
- type State = {
- currentUserId: string,
- }
-
- type Plugin = (config: PluginConfig) => (state: State) => void
-
- const RemoteStoragePlugin: Plugin = config => ({
- currentUserId,
- }) => {
- new Storage(currentUserId, config.baseUrl, 'notes')
- new Storage(currentUserId, config.baseUrl, 'folders')
- }
|