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

update reocoil ImportsMap v0.7.7 #493

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions src/presets/recoil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,45 @@ import type { ImportsMap } from '../types'

export default <ImportsMap>{
// https://recoiljs.org/docs/api-reference/core/atom/
// recoil v0.7.7
recoil: [
'DefaultValue',
'RecoilEnv',
'RecoilLoadable',
'RecoilRoot',
'atom',
'atomFamily',
'constSelector',
'errorSelector',
'isRecoilValue',
'noWait',
'readOnlySelector',
'retentionZone',
'selector',
'selectorFamily',
'snapshot_UNSTABLE',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should support every imports, but only the high-playing ones. DefaultValue doesn't make sense and seems to be a type export, *_UNSTABLE definitely no.

'useGetRecoilValueInfo_UNSTABLE',
'useGotoRecoilSnapshot',
'useRecoilBridgeAcrossReactRoots_UNSTABLE',
'useRecoilCallback',
'useRecoilRefresher_UNSTABLE',
'useRecoilSnapshot',
'useRecoilState',
'useRecoilValue',
'useSetRecoilState',
'useResetRecoilState',
'useRecoilStateLoadable',
'useRecoilState_TRANSITION_SUPPORT_UNSTABLE',
'useRecoilStoreID',
'useRecoilTransactionObserver_UNSTABLE',
'useRecoilTransaction_UNSTABLE',
'useRecoilValue',
'useRecoilValueLoadable',
'isRecoilValue',
'useRecoilCallback',
],
'useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE',
'useRecoilValue_TRANSITION_SUPPORT_UNSTABLE',
'useResetRecoilState',
'useRetain',
'useSetRecoilState',
'waitForAll',
'waitForAllSettled',
'waitForAny',
'waitForNone'
]
}