개발 메모

    개발/javascript 2

    React Redux 최소 설정 코드 (React Native)

    리덕스는 이렇게까지 복잡하게 써야하나 싶게 좀 햇갈리는 면이 있다. 자의로는 쓸거같지 않지만, 개념 파악을 위해 가장 심플한 코드로, 하나의 파일에 작성해 보았다. import {Button, Text, View} from "react-native"; import {Provider, useDispatch, useSelector} from "react-redux"; import {combineReducers, createStore} from "redux"; const initialState = { value: 0 } const counterReducer = (state = initialState, action) => { switch (action.type) { case "PLUS": return { .....

    개발/javascript 2023.03.30

    외부에서 데이터 가져오기 (fetch, axios)

    텍스트파일 const url = "/data/a.txt"; // fetch 1 const response = await fetch(url); const result1 = await response.text(); console.log(result1); // fetch 2 fetch(url).then((res)=>res.text()).then((data)=>console.log(data)) // axios const result2 = await axios.get(url); console.log(result2.data); json 파일 const url = "/data/channel.json"; // fetch 1 const response = await fetch(url); const result1 = aw..

    개발/javascript 2023.02.18
    이전
    1
    다음
    더보기
    프로필사진

    • 분류 전체보기 (39)
      • flutter (14)
        • widget (4)
        • 기타 (5)
      • 개발 (8)
        • javascript (2)
        • react (3)
        • python (2)
      • 비밀글 (2)
      • 기타 (1)

    Tag

    global key, opencv, FutureBuilder, libGL.so.1, libGL, XPEnology, Snackbar, grub.cfg, Firebase, cloud_firestore, Flutter, Authentification,

    최근글과 인기글

    • 최근글
    • 인기글

    최근댓글

    공지사항

    페이스북 트위터 플러그인

    • Facebook
    • Twitter

    Archives

    Calendar

    «   2025/07   »
    일 월 화 수 목 금 토
    1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30 31

    방문자수Total

    • Today :
    • Yesterday :

    Copyright © Kakao Corp. All rights reserved.

    티스토리툴바