๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ


Mobile

(13)
[React Native] Props ๋Œ€๋ถ€๋ถ„์˜ component ๋“ค์€ ์ƒ์„ฑํ•  ๋•Œ ๋‹ค๋ฅธ parameter๋“ค๊ณผ ํ•จ๊ป˜ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๊ฐ€๋Šฅํ•จ ์ด๋ ‡๊ฒŒ ์ƒ์„ฑํ•œ ํŒŒ๋ผ๋ฏธํ„ฐ๋“ค์„ props๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค (properties ์ค„์ž„๋ง) ์•„๋ž˜ ์ฝ”๋“œ์—์„œ Image๋Š” ํ•˜๋‚˜์˜ ๊ธฐ๋ณธ์ ์ธ React Native component์ด๋‹ค. ์ด๋ฏธ์ง€๋ฅผ ๋งŒ๋“ค ๋•Œ, ์–ด๋–ค ์ด๋ฏธ์ง€๋ฅผ ๋ณด์—ฌ ์ค„ ๊ฒƒ์ธ์ง€ ์ œ์–ดํ•˜๋Š” source๋ผ๋Š” prop์„ ์‚ฌ์šฉ ํ•  ์ˆ˜ ์žˆ๋‹ค. {pic} : JSX์— ํฌํ•จ๋œ ๋ณ€์ˆ˜. ์ค‘๊ด„ํ˜ธ๋ฅผ ์ฃผ๋ชฉํ•˜์ž! :D ์–ด๋–ค Javascript expression ์ด๋“  JSX์•ˆ ์ค‘๊ด„ํ˜ธ ์†์— ๋„ฃ์„ ์ˆ˜ ์žˆ๋‹ค. ๋‚ด๊ฐ€ ๋งŒ๋“  component์—๋„ props๋ฅผ ์‚ฌ์šฉ ํ•  ์ˆ˜ ์žˆ๋‹ค. (์•„๋ž˜ ์ฝ”๋“œ์—์„œ name) Greeting component์—์„œ name์„ prop์œผ๋กœ ์‚ฌ์šฉํ•จ์œผ๋กœ์จ, ๊ฐ๊ฐ์˜ greetings์—์„œ..
[React Native] Learn the Basics React Native๋Š” Reactํ•˜๊ณ  ๋น„์Šทํ•˜์ง€๋งŒ, web components (building blocks) ๋Œ€์‹  native components๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. React Native app ๊ธฐ๋ณธ ๊ตฌ์กฐ๋ฅผ ์ดํ•ดํ•˜๋ ค๋ฉด JSX, components, state, props ๋“ฑ์„ ์ดํ•ดํ•ด์•ผํ•œ๋‹น! Hello World ํ .. ES2015 ์•Œ์•„์•ผ ํ•˜๋‚˜์š”..? Hello world! ์ต์ˆ™ํ•˜์ง€ ์•Š์€ ์œ„ ์ฝ”๋“œ๋Š” JSX ์ด๋‹ค. Javascript ์•ˆ์— ํฌํ•จ๋˜๋Š” XML ๋ฌธ๋ฒ•. ๋Š” text๋ฅผ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋Š” component ์ด๊ณ , = or Components ์œ„ ์ฝ”๋“œ์—์„œ๋Š” HelloWorldApp๋ผ๋Š” ์ƒˆ๋กœ์šด Component๋ฅผ ์ •์˜ํ–ˆ๋‹ค. ์šฐ๋ฆฌ๊ฐ€ React Native app ์„ ๊ฐœ๋ฐœํ•  ๋•Œ ์ด์™€ ๊ฐ™์€ ์ƒˆ๋กœ์šด components..
Expo, Create React Native App create-react-native-app ํŒจํ‚ค์ง€๋ฅผ npm(node.js package manager)์„ ์ด์šฉํ•˜์—ฌ ์„ค์น˜ํ•˜์ž. RN์€ npm์„ ์ด์šฉํ•˜์—ฌ ๋””ํŽœ๋˜์‹œ๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค. npm install -g create-react-natvie-app ๋ญ๊ฐ€ ๋‹ค๋ฅธ๊ฑด์ง€ ๋ชจ๋ฅด๊ฒ ๋Š”๋ฐ, https://expo.io/learn : Get Started ์—์„œ๋Š” 1. Node.js ์„ค์น˜ 2. npm install expo-cli --global 3. expo init my-new-project cd my-new-project expo start 4. QR์ฝ”๋“œ๋กœ ํฐ์—์„œ ์—ด๊ธฐ 5. your-project/App.js๋กœ ์•ฑ ๋งŒ๋“ค๊ธฐ!
Getting Started 1. Expo tools Xcode or Anroid Studio๋ฅผ ์„ค์น˜, ์„ค์ •ํ•  ํ•„์š” ์—†์ด React Native๋ฅผ ๊ฐ€์žฅ ์‰ฝ๊ฒŒ ์‹œ์ž‘ ํ•  ์ˆ˜ ์žˆ๋‹ค. Snack์„ ์‚ฌ์šฉํ•ด์„œ web browser์—์„œ ๋ฐ”๋กœ React Native๋ฅผ ์‚ฌ์šฉํ•ด ๋ณผ ์ˆ˜ ์žˆ๋‹ค. Hello World import React, { Component } from 'react'; import { Text, View } from 'react-native'; export default class HelloWorldApp extends Component { render() { return ( Hello, world! ); } } https://expo.io/ Expo A free and open source toolchain built around..
failed to initialize HAX: Invalid argument ์˜ค๋ฅ˜ ใ… ใ… ใ… ใ… ใ… ใ… ใ… ใ… ใ… ใ…  Incompatible HAX module version 3, requires minimum version 4 No accelerator found. ์‚ฌ์ดํŠธ๋ฅผ ์ฐพ์•„์„œ ๋‹ค์šด์„ ๋ฐ›์œผ๋Ÿฌ ๊ฐ”๋‹ค https://github.com/intel/haxm intel/haxm Intel® Hardware Accelerated Execution Manager (Intel® HAXM) - intel/haxm github.com ์œˆ๋„์šฐ๋ผ์„œ ํ•ด๋‹น๋˜๋Š” ํŒŒ์ผ์„ ๋ฐ›์•„์„œ ์„ค์น˜ ํ•˜๋ ค๊ณ ํ•˜๋Š”๋ฐ, ์™œ ์ด๋Ÿฐ ๋ฉ”์„ธ์ง€๊ฐ€ ๋œจ๋Š”๊ฑฐ์ง€??????? 6.0.5๊ฐ€ ์žˆ๋Š”๋ฐ ์‹คํ–‰์ด ์•ˆ๋œ ์ด์œ ๊ฐ€ ๋ญ˜๊นŒ์š”?ใ…œ ๊ทธ๋ƒฅ 7.5.1 ์„ค์น˜ํ• ๋ž˜.. ์—๋ฎฌ๋ ˆ์ดํ„ฐ ์‹คํ–‰์€ ์„ฑ๊ณต!!