Frontend

· Frontend
Synchronous Actions Till now, as soon as an action was dispatched, the state was immediately updated. If you dispatch the BUY_CAKE action, the nomOfCakes was right away decremented by 1. Async Actions Asynchronous API calls to fetch data from an end point and use that data in your application. Goals for our application Fetches a list of users from an API end point and stores it in the redux stor..
· Frontend
#3.0 Introduction - terminal에서 원하는 폴더로 가서 다음 코드를 친다 expo init WorkHardTravelHardApp --npm -전에 했던거와 같이 아래 사진에서 그냥 blank에서 엔터친다. #3.1 Touchables - 우리가 만들 어플 디자인 링크 - 우선 맨 위의 'Groceries', 'Work' 라고 적혀있는 곳에 해당되는 헤더를 만들 예정. - Styles 의 paddingVertical, paddingHorizontal 은 css에는 없는 속성들. Button components (1) TouchableOpacity : sort of a view(a box?) that is ready to accept or listen for pressing events..
· Frontend
* 자막 없이 영어로 들어서 중간중간 영어가 많이 섞여있을 수 있음. #2.0 Snack https://snack.expo.dev/ Snack - React Native in the browser Write code in Expo's online editor and instantly use it on your phone. snack.expo.dev 웹 페이지에서 react native 코드도 치고, 바로 옆에 에뮬레이터로 결과도 보여줌. QR코드 찍어서 개인 핸드폰으로도 바로 볼 수 있음. 군대, 폰이 없는 경우 등 다양한 환경에서 웹 브라우저만 접속이 가능하면 들어가기 가능. #2.1 The Rules of Native - RN은 웹사이트, html이 아니라 div, span등이 존재하지 않음. -> ..
· ETC/Error
Error : Render Error Minified React error #321; visit https://reactjs.org/docs/error--decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. 니꼬쌤 react native 강의를 따라하다가 위와 같은 에러가 났다. 조금 찾아보니 심각한 에러는 아니었고, useEffect, useState를 쓸 때 자동완성으로 잘 안보고 잘못된 곳에서 import 했기 때문. 해결 방법은 다음과 같다. 에러가 난 코드 : import { useEffect, useSta..
· Frontend
Javascript로 현재 페이지를 새로고침 하는 법은 다음과 같이 세가지의 방법이 있습니다. //1 location.reload(true); //2 location.href = location.href; //3 history.go(0); 셋 중 아무거나 사용하시면 됩니다.
· ETC/Settings
크롬 개발자 도구로 디버깅을 하다보면, library나 minified file등 디버깅을 거칠 필요가 없는 파일까지 들어가게 될 때가 많습니다. 그럴 땐 해당 파일을 "ignore"해주면 됩니다. 방법은 다음과 같습니다. 1. 다음과 같이 디버깅 할 필요가 없는 파일을 열어줍니다. 디버깅 중에 해도 상관 없습니다. 2. 우클릭>"Add script to ignore list" 클릭 3. 성공! 이렇게 해주면 f9로 디버깅을 해도 위 파일들은 건너뛰게 됩니다. 다시 해당 파일을 디버깅 하고 싶다면 위 사진에서 'Remove from ignore list'를 클릭해주면 됩니다.
· Frontend
회사 코드에서 다음과 같이 선언된 함수들이 많아 궁금증이 생겨 포스팅을 하게 되었습니다. var variable = function(){ //function }; 구체적인 예시를 들어보겠습니다. functionOne() 과 functionTwo 에는 어떤 차이가 있을까요? var functionOne = function(){ console.log("Hello World!"); }; function functionTwo(){ console.log("Hello World!"); } 답은 다음과 같습니다. functionOne은 "function expression"이고 functionTwo는 "function declaration"이기 때문에 functionOne은 해당 줄이 실행되어야만 함수가 정의되고, ..
· ETC/Error
Error : The attempt to bind ~ in the workspace failed as this URI is malformed. URI 관련 오류이다. 작업하던 코드에 다음과 같은 코드가 있었다. location.href = "/support/faq/search/" + escape($scope.searchText); 검색어를 처리하는 부분인데, escape 함수를 쓰지 않고 그냥 변수를 쓰면 물음표와 우물정자가 검색어로 들어오면 에러가 떴었다. 이를 해결하기 위한 코드였는데 얘 때문에 위와 같은 에러가 떴던 것이다. 얘를 다음과 같이 고쳐주면 해결 완료! location.href = "/support/faq/search/" + encodeURIComponent($scope.searchTex..
rocher71
'Frontend' 태그의 글 목록