프론트앤드
-
[Next.js] 1. 쓰는 이유프론트앤드/[Next.js] 2023. 7. 4. 18:25
요새 주니어 개발자..취직 너무 힘들다.. 😂 뭐가 부족한지, 그리고 면접 갔었을 때 물어보던 것 들중 하나였던 ' Next.js 쓸줄 알아요? '... 그래서.. 준비하고 공부하려한다.. 일단.. 인강질렀다.. ㅎ 코딩애플 강의자분이 되게 말도 재밌게 해주시고, 이해도 잘 되게 말씀해주셔서 질렀고 ㅎ 프론트엔드 시대가 가고,, 이제 점점 풀스텍을 지향하는 시대가 오고 있다는데.. 미리 대비해야지.. ㅎ 취직 넘어렵짜냐... ㅠ_ㅠ..!! 나이제 Next.js 배워서 써먹을 예정이니 제발 나 뽑아줘라...ㅠ_ㅠ힝...!!!! 여튼!!! 여기서 부터 시작해보쟈 ~~ 웹 개발시 Client-side Rendering 시대가 가고 Server-side Rendering 시대가 오고 있기 때문! Client-s..
-
[React] Redux프론트앤드/[React] 2023. 7. 2. 21:45
드디어 Redux를 공부해본다... 그토록 어렵다고 들었던... 그래서 일단은 시작은 조심스럽게..해보쟈 ... 😣 Redux란? - 공식문서에서는 자바스크립트 앱을 위한 예측가능한 컨테이너 라고 소개한다. : 단방향 데이터 흐름을 이용해 예측 가능하고, 일관적인 상태 컨테이너의 역할을 제공하는 라이브러리 : Flux 패턴에 영감을 받은 Dan Abramov 가 개발함 : React 또는 다른 View 라이브러리들과 함께 사용할 수 있다. : Flux패턴과 혼동이될 수 있는데, Flux는 디자인패턴으로 일종의 실체가 없는 개념이다. 이러한 패턴을 쉽게 적용할 수 있도록 자바스크립트로 구현한 구현체가 Redux 이다. Redux의 3가지 원칙 1. 진실은 하나의 소스로부터 2. 상태는 읽기 전용이다 3. ..
-
[React] 디자인 패턴 (MVC, Flux)프론트앤드/[React] 2023. 7. 1. 16:08
디자인패턴 : 어플리케이션 설계 중 자주 발생하는(되풀이되는) 문제에 대한 모범답안 즉, 프로그램을 개발하면서 생기는 문제를 해결하는 모법답안을 말한다. 디자인 패턴을 사용하는 이유? - 검증된 해결책 : 이미 검증된 방식 및 방법으로 해결방안을 찾을 수 있음 -> 효과적으로 코드 개선 - 효율적인 소통방식 : 거대하고 복잡한 코드는 규모가 작을때부터 체계적인 규칙이 필요하다. -> 매번 디테일한 설명을 거치지 않고, 사전에 약속해둔 용어들로 표현할 수 있도록 해준다. -> 의미를 명확하고 효율을 높이고, 체계적인 코드를 만들 수 있음 - 유지보수 용이 : 각각 기능을 담당하는 영역을 분리(관심사별로) 헤서 관리할 수 있도록 설계됨 -> 필요한 부분만 수정 가능 - 상대적으로 코드 레벨에 가까운 디자인 ..
-
[React] Custom Hook (useInput)프론트앤드/[React] 2023. 6. 19. 19:48
사용이유 : 코드의 재사용쉬움 (우리의 입맛대로 만들 수 있음) 그냥 함수를 하나 만듦 1. 원하는 이름 짓기 2. 원하는 기능을 함수 안에 구현 해주면 된다. (매개변수와 리턴 값도 마음대로 정할 수 있다) ** 컴포넌트 내부에 있던 로직을 커스텀 훅이라는 함수로 빼주는 역할을 한다! + 커스텀 훅 안에서 다른 React Hook들을 자유롭게 사용할 수 있다는 장점도 있다! + 커스텀 훅을 사용하는 컴포넌트마다 커스텀 훅이 가지는 state와 effect는 완전히 독립적인이기 때문에 재사용성이 아주 큼!!! 이름을 마음대로 지어도 되지만, 커스텀 훅 도 React의 hook 이므로 'use' 라는 키워드를 사용해야함 => 실수를 하더라도 리엑트 자체에서 콘솔에 경고를 잘 띄워줌 (오류 방지용) 1. ..
-
[React] React.js로 전화걸기 링크 제공 하기프론트앤드/[React] 2023. 4. 22. 20:54
기업협업중 import React from 'react'; import { CopyToClipboard } from 'react-copy-to-clipboard'; import * as S from './CallModal.style'; const CallModal = ({ detailMartList, handleModal }) => { const handleCopy = () => { alert('복사되었습니다.'); }; return ( {detailMartList[0].martPhoneNumber.replace( /(\d{2})(\d{3,4})(\d{4})/, '$1-$2-$3' )} 전화 걸기 연락처 저장하기 클립보드 복사하기 ); }; export default CallModal; 부모 컴포넌트로 ..
-
[React] input 으로 프로필 이미지 업로드 하기프론트앤드/[React] 2023. 4. 20. 19:45
👀 컴퓨터 안에있는 파일 이미지를 이용해서 업로드 할 수 있는 기능을 구현해 보았다! 생각보다 간단해서 정리해 보았다 :) 이용한 것 - input type: file - useState import React, { useState } from 'react'; import * as S from './Mypage.style'; const Mypage = () => { const [uploadedImage, setUploadedImage] = useState(null); const onChangeImage = e => { const file = e.target.files[0]; const imageUrl = URL.createObjectURL(file); setUploadedImage(imageUrl); }..
-
[2차 프로젝트] small box read me + 회고록프론트앤드/이것저것 2023. 4. 8. 15:46
🙋🏻♀️ 위코드에서의 2차 프로젝트를 마쳤다 🙋🏻♀️ 정말이지.. 1차때보다 더 어려운 예시 홈페이지들이 많았고, 그 중 우리는 cgv를 참고로하는 프로젝트를 진행하게 되었다. ' 영화관 예매 서비스 컨텐츠 ' 우리 small box의 회고를 시작하겠다 . CGV : 다양한 장르의 영화와 경험을 상영함으로써 관객에게 관람환경 뿐만 아니라 그 이상의 서비스와 감동을 전달 함으로써, 다양한 즐거움과 특별환 경험을 통해 total lifestyle을 선도하는 종합 생활문화 공간 제공 을 한다면 small box ‘독립영화, 즉 신선한 장르와 특별한 소재를 좋아하거나 입문하고자 하는 관객에게 영화를 선보이자 ’ 라는 목표를 두고 다양한 장르에서 보다 감성적인 인디영화에 포커스를 두어 주 매니아층 그리고, 다..
-
[React] 인터넷 연결확인 모달 + 컴포넌트 종료(?) 나가기프론트앤드/[React] 2023. 4. 5. 16:52
매일매일이 새롭당 : ) 하핳 이 전 포스팅에서는 인터넷 연결 확인 및 경고 모달을 띄웠다면, https://hayley-0616.tistory.com/47 [React] 인터넷 연결확인 및 경고모달 기업협업 중이당...ㅎ 이 전 포스트 글과 마찬가지로, login ->home 으로 이어지는데 이 때, login 컴포넌트가 제일 처음 랜더링 될 때, 인터넷 연결을 확인하고, 만약 안되어 있는경우에는 경고모달을 hayley-0616.tistory.com 이 번 포스팅에서는 모달의 '확인'을 누른 경우 컴포넌트가 종료(?) 혹은 나가지는 로직을 구현해 보았다. 점점 새로운것을 알게되면서 적용하니 아주 신기하다눙.. 👀 Login.jsx (부모컴포넌트) 에서 선언 => props 로 NetworkCheckMo..