현재 fake data는 json server에서 filter 기능을 사용할 수 없다.. 못찾는 건가?
tags는 배열로 되어 있는데 이부분에서 tags안에 원하는 태그를 포함하는 목록만 뽑아올 수 없었다. (like는 사용할 수 있었지만, 이 경우에는 해당 단어(Java를 원하는데, JavaScript도 같이 불러와짐)를 포함하는 경우 다 보여진다.
그래서 현재 상태는 /?tag=JavaScript 형태로 locaction을 보내서 전체 리스트를 불러온 뒤 reducer의 action 처리에서 단순히 reduce와 includes메소드를 사용하여 제외시킨 뒤 스터디 리스트를 rendering 해준다.
백앤드 구현 후는 /?tag=JavaScript에서 JavaScript를 백앤드로 같이 보내준 후 해당 태그가 있으면 불러오는 식으로 변경할 예정.
🤔 참고할 사항
/?tag=JavaScript
형태로 locaction을 보내서 전체 리스트를 불러온 뒤reducer
의action
처리에서 단순히reduce
와includes
메소드를 사용하여 제외시킨 뒤 스터디 리스트를 rendering 해준다./?tag=JavaScript
에서JavaScript
를 백앤드로 같이 보내준 후 해당 태그가 있으면 불러오는 식으로 변경할 예정.