Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export main adapters from module root index #37

Merged
merged 1 commit into from
Dec 7, 2022
Merged

Conversation

yumauri
Copy link
Owner

@yumauri yumauri commented Dec 7, 2022

Improve PR #36 further:

Instead of

import { persist } from 'effector-storage'
import { local } from 'effector-storage/local'
import { query } from 'effector-storage/query'

// ...

persist({ adapter: local(), store: $session })
persist({ adapter: query(), store: $page })

it is possible to write

import { persist, local, query } from 'effector-storage'

// ...

persist({ adapter: local(), store: $session })
persist({ adapter: query(), store: $page })

⚠️ Note though, that tree shaking will work only with ES modules

@yumauri yumauri merged commit 247f253 into master Dec 7, 2022
@yumauri yumauri deleted the root_exports branch December 7, 2022 17:08
@yumauri yumauri added this to the 6.0.0 milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant