인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

terecal's profile image
terecal

asked

Creating NodeBird SNS with React

7-10. Easily write immutability with immer

해쉬 태그 클릭하면 해쉬태그가 아닌것도 출력되여

Written on

·

127

0

git : https://github.com/hyunsokstar/node_bird_22/blob/master/front/reducers/post.js
해쉬 태그로 게시글 불러올때 push로 불러와서 그런게 아닐까여?
code:
            case LOAD_MAIN_POSTS_SUCCESS:
            case LOAD_HASHTAG_POSTS_SUCCESS:
            case LOAD_USER_POSTS_SUCCESS: {
                // return {
                //  ...state,
                //  mainPosts: state.mainPosts.concat(action.data),
                //  hasMorePost: action.data.length === 10,
                // };
                action.data.forEach((d=> {
                    draft.mainPosts.push(d);
                });
                draft.hasMorePost = action.data.length === 10;
                break;
          }


git 주소: https://github.com/hyunsokstar/node_bird_22/blob/master/front/reducers/post.js

javascriptreact

Answer 4

1

zerocho님의 프로필 이미지
zerocho
Instructor

서버쪽에서 제대로 검색을 못하는 것 같습니다.

0

zerocho님의 프로필 이미지
zerocho
Instructor

hashtag.js에서 LOAD_HASHTAG_POSTS_REQUEST할 때 lastId: 0을 넣어주세요.

0

terecal님의 프로필 이미지
terecal
Questioner

라우터는 모두 복붙했는데도 같은 증상이에요  url로 그냥 요청하면 태그인것만 잘출력되는데 태그를 클릭하면  태그가 아닌것에 추가가 되여 

 

0

terecal님의 프로필 이미지
terecal
Questioner

서버쪽 문제인건가여;; 잘찾아볼게여 감사합니다 

terecal's profile image
terecal

asked

Ask a question