목록ㄴ (1)
hmk run dev
무한스크롤
파이어 스토어 데이터를 짤라서 가져와야한다 정렬은 시간 데이터 내림차순! const getPostFB = () => { return function (dispatch, getState, { history }) { const postDB = firestore.collection("post"); let query = postDB.orderBy("insert_dt", "desc").limit(2); //콜랙션에서 내림차순으로 데이터 가져오기 query.get().then((docs) => { let post_list = []; docs.forEach((doc) => { // 잘 가져왔나 확인하기! :) // 앗! DB에서 가져온 것하고 우리가 Post 컴포넌트에서 쓰는 데이터 모양새가 다르네요! // cons..
React
2021. 3. 29. 11:50