모든 시간 두자리로 만들기 ////////// 현재 시간 반환 함수(모든 수 두자리) const currentTime = () => { // 현재 시각을 나타내는 JavaScript Date 객체 생성 const t = new Date(); // 년, 월, 일, 시, 분, 초 추출 const year = t.getFullYear(); const month = String(t.getMonth() + 1).padStart(2, "0"); // 월은 0부터 시작하므로 1을 더하고, padStart로 두 자리로 만듭니다. const day = String(t.getDate()).padStart(2, "0"); // 일도 padStart로 두 자리로 만듭니다. const hours = String(t.getHou..
arr="01012345678" replaceArr = arr.replace(/(\d{3})(\d{4})(\d{4})/, "$1-$2-$3"); console.log(replaceArr); //010-1234-5761 반환
https://extrememanual.net/7922 윈도우10 정품인증 CMD로 하는 방법 - 익스트림 매뉴얼윈도우10에서 명령 프롬프트(cmd)를 이용해 정품 인증을 하는 방법은 KMS를 이용합니다.extrememanual.net
// 슬롯텍스트 모션 컴포넌트const SlotTextMotion = () => { // 슬롯에 표시될 문자열을 담은 배열 const majorArray = [1,2,3,4,5,6,7,8,9,10]; // 현재 보여지고 있는 슬롯의 인덱스를 나타내는 상태 변수 const initNum=Math.floor(Math.random() * majorArray.length); const [currentIndex, setCurrentIndex] = useState(initNum); const [index,setIndex]=useState(1);// // 애니메이션이 완료되면 호출되는 함수 const onAnimationComplete = async () => { const randNum = M..
props로 함수 전달하기(매개변수x) //부모 컴포넌트 import React from "react"; import Child from "./Child"; const Parent = () => { // props로 전달할 함수 const testFunc = () => { console.log("addArticle 함수 호출"); }; return ; }; export default Parent; // 자식 컴포넌트 import React from "react"; const Child = ({ propsFunc }) => { return ( // 버튼 클릭 시 부모 컴포넌트의 testFunc 함수 호출 Add Article ); }; export default Child; props로 함수 전달하기(매개..
https://www.framer.com/motion/use-in-view/ useInView | Framer for DevelopersA simple state hook for when an element is within the viewport.www.framer.com https://velog.io/@flashclub/%EB%A6%AC%EC%95%A1%ED%8A%B8-%EC%8A%A4%ED%81%AC%EB%A1%A4%EC%97%90-%EB%94%B0%EB%A5%B8-%EC%95%A0%EB%8B%88%EB%A9%94%EC%9D%B4%EC%85%98-%EA%B5%AC%ED%98%84-feat.-framer-motion 리액트 스크롤에 따른 애니메이션 구현 (feat. framer-motion)frame..
//렌더링 ; // 스타일 밑 컴포넌트 const PromotionContainer = styled.div` background-color: #4d207a; width: 100%; height: 150px; display: flex; flex-direction: column; justify-content: center; `; const SlideTextContainer = styled(PromotionContainer)` overflow-x: hidden; display: flex; flex-direction: column; `; const SlideText = styled.div` white-space: nowrap; `; const MotionSlideText = ({ direction, text }..
https://www.hanl.tech/blog/vs-code-react-time-awesome-snippets/