Develop/React 썸네일형 리스트형 React Hooks React v16.8에 React Hooks라는 기능이 추가가 되었다. 이 기능은 기존 state 기능을 Functional component에서도 가져다 사용할 수 있는 기능이다.기본 사용법은 아래와 같다.import React, { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call "count" const [count, setCount] = useState(0); return ( You clicked {count} times setCount(count + 1)}> Click me );}기존에 이와같은 기능을 구현하려면 class component를 만들어 해당 클래스 내의 stat.. 더보기 Using environment variables in the .env file in reactjs .env fileREACT_APP_NODE_ENV=REACT_APP_GOOGLE_KEY= index.jsimport dotenv from "dotenv";dotenv.config();...const { REACT_APP_NODE_ENV, REACT_APP_GOOGLE_KEY } = process.env;... You can use dotenv module with REACT_APP_ prefix.. 더보기 [ReactNative] Expo ios simulator said "This version of ..." When after update expo-cli.. the ios simulator said like this.."This version of the Expo app is out of date. Uninstall the app and run again to upgrade."The expo app on ios simulator is out of date..The solutions is just Remove the expo app on ios simulator and restart expo project..Open the ios simulator..and press the home button on the bottom of the simulator..And find the Expo application..a.. 더보기 이전 1 2 3 4 다음