티스토리 뷰
무한스크롤 코드 자체는 생각보다 간단한데 댓글을 리덕스로 전역으로 관리해서 계속 에러가 났다.
스토어에서 관리하지 않고 컴포넌트 자체에서 api 를 요청해서 사용하는 방법을 시도 중...
[React]Intersection Observer 사용하여 무한스크롤 구현하기
무한 스크롤...? 어렵지 않아요😅
velog.io
react로 구현하는 무한 스크롤, Intersection Observer API, react-window, infinity scroll, react, next, react-virtualized
react로 구현하는 무한 스크롤, Intersection Observer API, react-window, infinity scroll, react, next, react-virtualized
kyounghwan01.github.io
- 오늘 만든 날짜 형식 변환 모듈 파일
date.js
/* eslint-disable consistent-return */
function formatTime(date) {
if (!date) {
return;
}
let intl = new Intl.DateTimeFormat('ko', { dateStyle: 'short' }).format(
new Date(date),
);
intl = intl.replaceAll(' ', '').slice(0, -1);
if (intl.indexOf(3) !== 0) {
intl = `${intl.slice(0, 3)}0${intl.slice(3, 8)}`;
}
return intl; // 23.01.01
}
function settingDate(date) {
if (!date) {
return;
}
let intl = new Intl.DateTimeFormat('ko', { dateStyle: 'medium' }).format(
new Date(date),
);
intl = intl.replaceAll(' ', '').slice(0, -1);
return intl; // 2023.01.01
}
export { formatTime, settingDate };
https://www.daleseo.com/js-intl-api/
자바스크립트의 Intl API
Engineering Blog by Dale Seo
www.daleseo.com
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
Intl.DateTimeFormat - JavaScript | MDN
The Intl.DateTimeFormat object enables language-sensitive date and time formatting.
developer.mozilla.org
https://fromnowwon.tistory.com/entry/react-ga-google-analytics
[React] react-ga로 리액트와 구글 애널리틱스 연결하기
리액트 프로젝트를 구글 애널리틱스와 연동하여 방문자 추적 등 여러 데이터를 수집하고 활용해보자. 목차 웹사이트 분석이 필요한 이유 리액트와 구글 애널리틱스 연결하기 웹사이트 분석이
fromnowwon.tistory.com
https://prod.velog.io/@zero-black/Google-analytics-4-with-React
Google analytics 4 with React
지난글에서 열심이 설정을 했는데, 유니버설 애널리틱스에는 문제가 있다. 바로 지원 종료까지 1년이 안남았다. 처음 검색했을 때 react-ga는 GA4가 지원이 되지 않는다고 나왔어서 일단 했는데, 찾
velog.io
- 렌더링 최적화 세션 다시 듣기
- 'Access-Control-Allow-Origin': '*' 삭제하기
'Edu_hanghae99 > TIL' 카테고리의 다른 글
[TIL] 230202 (0) | 2023.02.03 |
---|---|
[TIL] 230201 (0) | 2023.02.02 |
[TIL] 230126 (3) | 2023.01.27 |
[TIL] 230125 (0) | 2023.01.25 |
[TIL] 230124 (0) | 2023.01.24 |