본문 바로가기

프론트엔드 공부

(134)
swiper 이전 다음 버튼 비활성화 loop = {false}, autoplay 기능을 꺼주면 비활성화기능이 적용된다 console.log(swiper)} >
react 로 날짜피커 만들기 (스크롤) https://www.npmjs.com/package/react-mobile-picker-scroll/v/0.2.12 https://codesandbox.io/s/5wrkm0qqjx?file=/src/index.js https://codesandbox.io/s/my5xvz3869?file=/src/index.js
/:id 페이지에서 location.state로 형제컴퍼넌트에 값 넘겨주기(history사용) /:id 인 페이지에 location.state.statekey값 넘겨야 할때 !! (다른페이지에서 최초로 history.push("/subpage/1",{userId:넘겨줄값}) 구현할 페이지에서 넘어온 객체({userId:넘겨줄 값})를 하단과 같이 location 을 활용하여 넘기고 넘겨주면 각페이지에서 적용 가능하며, 마지막 결과 페이지에서 다른 페이지로 값을 넘겨줄수도 있다 ! //useHistory, useLocation import 해주고 [...] const passUserId1 = () => { history.push("/sform/1", 특정값 ); }; const passUserId2 = () => { history.push("/sform/2", location.state); }; c..
history.push(경로,{}) history.push 로 넘어가는 경로 페이지에 오브젝트를 넘겨주고, location을 props 로 받아 쓸수 있음, 단 해당경로페이지 라우팅이 "/페이지/:id"와 같이 파라미터를 받아야하는 페이지.js 인 경우 const userId = location.state.userId로 상위에 정의 내려 버리면 하위에 들어가는 모든 페이지 (ex. '/페이지/1','/페이지/2','/페이지/3'...) 에서 모두 userId를 찾기 때문에 오류 발생하므로 원하는 페이지에 직접 {location.state.userId}로 정의 해주는 것 이좋음. imort {useHistory} from react-router-dom; const App = () =>{ const history = useHistory(); ..
redux axios redux thunk 예제 https://github.com/fangmin26/React_Redux_Tutorial/tree/master/src GitHub - fangmin26/React_Redux_Tutorial Contribute to fangmin26/React_Redux_Tutorial development by creating an account on GitHub. github.com folk한 연습용 예제이니 참고만 할것, **redux와 다른 사항 : axios 불러오는 것, composeEnhancers 사용함,(thunk github페이지에 튜토리얼나와있음)
정말 다양한 input type
input type checkbox value 값 읽어내기 예제 input type checkbox value 값 읽어내기 예제 https://codepen.io/fangmin/pen/MWoYxyw
chart.js 다중차트 https://natalie-rojas113.medium.com/a-beginners-guide-to-creating-beautiful-charts-using-chart-js-react-e6f2cb47b20b A Beginner’s Guide to Creating Beautiful Charts using Chart.js + React Chart.js is a simple yet powerful tool for data visualization. natalie-rojas113.medium.com