getDataAtomFamily 함수 (fetch) #13
asdfqaz74
started this conversation in
커스텀훅 / 유틸함수
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
getDataAtomFamily
포켓베이스에서 비동기 통신으로 데이터를 가져올 수 있는 함수입니다.
Method
item: string;
가져오고 싶은 collection을 쓰면 됩니다.
typeOfGetData: 'getFullList' | 'getOne' | 'getList' | 'getFirstListItem';
Data를 가져오는 방식을 선택합니다.
options?: object;
ex) options: {expand: 'rating'}, options: {filter: 'created >= "2022-01-01 00:00:00"'}
등 원하시는 부가옵션을 기입하시면 됩니다.
setting?: number | string
원하시는 페이지 또는 id값을 기입하시면 됩니다.
사용 예시
위의 코드는 다음의 코드와 같습니다.
전체 코드
Beta Was this translation helpful? Give feedback.
All reactions