일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- network configuration
- 목록처리
- 구멍가게코딩단
- resttemplate
- 네트워크 설정
- 처음 만나는 AI수학 with Python
- 알파회계
- 스프링부트핵심가이드
- 자바편
- 서버설정
- 처음 만나는 AI 수학 with Python
- 선형대수
- 코드로배우는스프링부트웹프로젝트
- 데비안
- 리눅스
- 이터레이터
- baeldung
- 자료구조와 함께 배우는 알고리즘 입문
- iterator
- 스프링 시큐리티
- 티스토리 쿠키 삭제
- 페이징
- Kernighan의 C언어 프로그래밍
- ㅒ
- GIT
- 코드로배우는스프링웹프로젝트
- 친절한SQL튜닝
- 자료구조와함께배우는알고리즘입문
- /etc/network/interfaces
- d
- Today
- Total
목록Framework (105)
bright jazz music
import { Container, List, Paper } from '@mui/material'; import './App.css'; import Todo from './Todo'; import React, { useState } from 'react'; import AddTodo from './AddTodo'; function App() { const [items, setItems] = useState([ // { // id: "0", // title: "Hello World 1", // done: true // }, // { // id: "1", // title: "Hello World 2", // done: true // } ]); //2. TodoList에 목록 추가하기 const addItem..
App.js -> 추가 -> AddTodo.js -> Todo.js -> 수정/삭제/체크 -> 재 렌더링(App.js) // App.js import "./App.css"; import Todo from "./Todo"; import AddTodo from "./AddTodo"; import React, { useState } from "react"; import { Paper, List, Divider, Container } from "@mui/material"; function App() { //기본 스테이트를 객체로 설정하였다. const [items, setItems] = useState([]); //Todo에서 쓰레기통 아이콘을 클릭하면 삭제된다. 이걸 를 호출할 때 넣어준다. 위를 봐라. co..
material-ui 라이브러리 설치 npm install @mui/material @emotion/react @emotion/styled npm install @mui/material @mui/styled-engine-sc styled-components npm install @fontsource/roboto npm install @mui/icons-material axios 설치 npm install axios react-router-dom 설치 npm install react-router-dom index.js import React from "react"; import ReactDOM from "react-dom/client"; import "./index.css"; import Main from..
1. App.js 작성 import axios from "axios"; import { useState, useEffect } from "react"; function NameAndAge(props) { if (props.data !== null) { // 입력받은 props.data 에서 직접 값을 가져오는 경우 const name = props.data.name; const age = props.data.age; console.log("##name: " + name + ", ##age: " + age); console.log( typeof props.data.age, ": props.data.age와 그 값을 입력받은 age 모두 number 타입이다. " ); console.log("#"); // ..
React에서 axios를 사용하여 POST 요청을 보내는 방법을 알려드리겠습니다. 먼저, `axios` 패키지를 설치해야 합니다. 프로젝트 디렉토리에서 다음 명령을 실행하여 패키지를 설치합니다. npm install axios 설치가 완료되었다면, POST 요청을 보내는 React 컴포넌트에서 `axios`를 import합니다. import axios from 'axios'; 그리고 POST 요청을 보낼 함수를 만듭니다. 함수에서 `axios.post()`를 사용하여 요청을 보냅니다. 다음은 간단한 예시입니다. import React from 'react'; import axios from 'axios'; class MyComponent extends React.Component { constructo..
https://swapi.dev/api/ 1. App.js 작성 import { useEffect, useState } from "react"; import axios from "axios"; function App() { const [people, setPeople] = useState([]); const [error, setError] = useState(null); const [ok,setOk] = useState(null); // 동기처리 // useEffect(() => { // axios.get('https://swapi.dev/api/people/') // .then((data) => { // console.log('##data', data) // setPeople(data.data?.res..
1. 설치 및 환경설정 PS D:\react-workspace\nextjs-test> npx create-next-app@latest . √ Would you like to use TypeScript with this project? ... No / Yes √ Would you like to use ESLint with this project? ... No / Yes √ Would you like to use Tailwind CSS with this project? ... No / Yes √ Would you like to use `src/` directory with this project? ... No / Yes √ Use App Router (recommended)? ... No / Yes √ Wo..
1. redux toolkit 설치 /*기존 프로젝트에 리덕스 툴킷 설치*/ $npm install @reduxjs/toolkit /*새 프로젝트 생성 시 리덕스 툴킷 설치 */ $npx create-react-app test-app --template redux 2. App.js 작성 import React from "react"; import {Provider, useDispatch, useSelector} from 'react-redux' //툴킷 임포트 import {configureStore, createSlice} from '@reduxjs/toolkit'; //슬라이스는 작은 store를 뜻한다. 여러 개 만들 수 있다.기존에는 하나의 store에 전부 집어넣었다. 리덕스 툴킷은 이러한 슬라..
1.App.js 작성 import React from "react"; import {createStore} from 'redux'; import {Provider, useDispatch, useSelector} from 'react-redux' //1. redux를 사용하기 위한 reducer 함수 function reducer(state, action){ if(action.type === 'up') { return {...state, value:state.value + action.step} } return state; //상태 반환 } const initialState = { value : 0 } //2. store 생성 const store = createStore(reducer, initialSt..
1. redux와 react-redux 설치 $npm install redux react-redux 2. App.js 작성 import React, {useState} from "react"; import "./style.css"; import {createStore} from 'redux'; // import {configureStore} from 'redux'; import {Provider, useSelector, useDispatch, connect} from 'react-redux' /* 스토어를 생성할 때 reducer를 생성한다. 리듀서는 스토어에 있는 스테이트의 변경 여부를 결정하는 역할을 한다. 따라서 reducer는 2개의 파라미터를 받는다. 첫 번째는 현재 스테이트 값인 current..