본문 바로가기

분류 전체보기241

[React] useMemo useMemo useMemo is a React Hook that lets you cache the result of a calculation between re-renders. const cachedValue = useMemo(calculateValue, dependencies) Parameters calculateValue: The function calculating the value that you want to cache. It should be pure, should take no arguments, and should return a value of any type. React will call your function during the initial render. On next rende.. 2023. 11. 29.
[React] useCallback useCallback useCallback is a React Hook that lets you cache a function definition between re-renders. const cachedFn = useCallback(fn, dependencies) Parameters fn: The function value that you want to cache. It can take any arguments and return any values. React will return (not call!) your function back to you during the initial render. On next renders, React will give you the same function agai.. 2023. 11. 28.
[React] useRef useRef useRef is a React Hook that lets you reference a value that’s not needed for rendering. const ref = useRef(initialValue) Parameters initialValue: The value you want the ref object’s current property to be initially. It can be a value of any type. This argument is ignored after the initial render. Returns useRef returns an object with a single property: current: Initially, it’s set to the .. 2023. 11. 28.
[React] useEffect useEffect useEffect is a React Hook that lets you synchronize a component with an external system. useEffect(setup, dependencies?) 예시) useEffect(() => { const connection = createConnection(serverUrl, roomId); connection.connect(); return () => { connection.disconnect(); }; }, [serverUrl, roomId]); Parameters setup: The function with your Effect’s logic. Your setup function may also optionally re.. 2023. 11. 28.
[React] useState useState useState is a React Hook that lets you add a state variable to your component. Returns useState returns an array with exactly two values: The current state. During the first render, it will match the initialState you have passed. The set function that lets you update the state to a different value and trigger a re-render. useState는 초기값과 re-render를 트리거하는 set함수를 넘겨준다. 초기값으로 object를 넘길 수도 .. 2023. 11. 27.
[React] 리액트 개요 State Hooks State lets a component “remember” information like user input. useState declares a state variable that you can update directly. useReducer declares a state variable with the update logic inside a reducer function. Context Hooks Context lets a component receive information from distant parents without passing it as props. useContext reads and subscribes to a context. Ref Hooks Refs le.. 2023. 11. 27.
[Block Chain] 블록체인 월렛 개발 강의 블록체인 월렛을 개발하는 좋은 강의가 있어서 주말 동안 수강했다. 이 강의는 ethers.js를 가지고 계정을 생성하고 다른 계정으로 송금하는 는 등의 내용을 학습하게 된다. 개인적으로 크롬 익스텐션 개발의 전체적인 흐름을 파악할 수 있어서 좋았다. 기존에 웹 개발 스택하고 다른 것이 아니라, 그냥 동일하다. 크롬 익스텐션 옵션에 맞게 설정해주고 화면만 작게 만들면 끝이다. 크롬 익스텐션은 클라이언트 코드와 동일하게 동작하는데, 백엔드와 연동하는 처리를 추가할 수 있다. (그냥 프론트엔드라고 생각하면 편하다) 이 강의에서 DAPP과의 연동을 다루지는 않아서 그 부분은 추가적인 학습이 필요하지만, 강의 퀄리티에는 꽤 만족한다. 원하는 포트폴리오를 만들기 위한 기반 지식을 익히는데 많은 도움이 되었다. 다음.. 2023. 11. 20.
응용 프로그램 코드 사인 방법(간단한 조사) 응용 프로그램 코드사인 방법에 대해 조사했다. 인증서를 구매하여 pfx 파일을 받은 이후에 SignTool을 이용하여 응용 프로그램 서명을 진행할 수 있다. 다음 예시처럼 파일을 디지털 서명과 타임스탬프를 지정하는 명령어를 제공한다. signtool sign /f MyCert.pfx /t http://timestamp.digicert.com /fd SHA256 MyFile.exe https://learn.microsoft.com/ko-kr/windows/win32/seccrypto/signtool?redirectedfrom=MSDN 다음은 코드 인증서 업체에서 조사한 가격 정보(MSDN 오피셜 4곳) 1. DigiCert 코드 서명 인증서 기관 연 2000개 - 1년 699 USD - 2년 574 USD.. 2023. 11. 19.
[Block Chain] IPFS 프로토콜 정리 InterPlanetary File System는 분산 파일 시스템에 데이터를 저장하고 공유하기 위한 프로토콜, 하이퍼미디어, 파일 공유 P2P 네트워크이다. IPFS는 콘텐트 어드레싱을 사용하여 IPFS 호스트에 연결하는 전역 이름공간의 개별 파일을 고유하게 식별한다. (위키백과) What is IPFS IPFS is a modular suite of protocols for organizing and transferring data, designed from the ground up with the principles of content addressing and peer-to-peer networking. Because IPFS is open-source, there are multiple impl.. 2023. 11. 19.
Nginx 웹서버 정리 3 nginx Process Roles 마스터 프로세스가 처리하는 작업은 다음과 같다. 읽고 구성을 검증하는 것 소켓을 생성하고 연결하며 닫는 것 구성된 워크 프로세스 수를 유지하고, 시작/종료 하는 것 서비스 중단없이 재구성하는 것 논스탑 바이너리 업데이트를 제어하는 것(새로운 바이너리를 시작하고 필요시 이전 것을 롤백) 로그 파일 다시 열기 내장 펄 스크립트 컴파일링 워커 프로세스는 받아들이고 관리한다. 클라이언트로부터 연결을 진행한다. 리버스 프록시와 필터링 기능을 제공하고 엔진엑스가 할 수 있는 대부분의 것을 제공한다. 엔진엑스 인스턴스의 행동 모니터링과 관련하여, 시스템 관리자는 워커가 실제 동작을 반영하고 있는지 확인해야 한다. 캐시로더 프로세스는 온디스크 캐시 아이템을 확인하고 엔진엑스의 인메모.. 2023. 11. 17.