본문 바로가기

전체 글

(68)
Process of showing datas to client [React] Questions How to get datas from the backend. How to pass the data between components How to show data. Process of showing datas to client. How to get datas form the backend Use "Axios"(is a lightweight HTTP client based on the XMLHttpRequest service). you can request and can get datas by using "Axios" and API. const [Product, setProduct] = useState([]) useEffect(() => { Axios.get(`/api/product/p..
Context API [React] Context API If we use 'context', we don't need pass props to each layer. we can pass values using context just at once. For example, Usually it is used for current authenticated user, preferred language. React.createContext const MyContext = React.createContext(defaultValue);When React renders a component that subscribes to this Context object it will read the current context value f..
Hooks code example [React] Hooks code examples Hooks helps functional components. like managing state or doing work after rendering. useState It is the nomalist hook. This let the functional component can have variables which can change. import React, { useState } from 'react'; const Counter = () => { const [value, setValue] = useState(0); return ( current value is {value}. setValue(value + 1)}>+1 setValue(value -..
Component keywords [React] All of the React Component keywords Components let you split the UI into independent, resuable pieces, and think about each piece in isolation. When you use Class Component, you must define 'render()' constructor() The contructor for a React component is called before it is mounted. Typically, in React constructors are only used for two purposes: Initializing local state by assigning an ..
MongoDB query db.inventory.insertMany([ { item: "journal", qty: 25, size: { h: 14, w: 21, uom: "cm" }, status: "A" }, { item: "notebook", qty: 50, size: { h: 8.5, w: 11, uom: "in" }, status: "A" }, { item: "paper", qty: 100, size: { h: 8.5, w: 11, uom: "in" }, status: "D" }, { item: "planner", qty: 75, size: { h: 22.85, w: 30, uom: "cm" }, status: "D" }, { item: "postcard", qty: 45, size: { h: 10, w: 15.25, u..
What is node.js?[not done]
종이접기 [프로그래머스] 실패 문제 "[
passport-facebook with JWT [Express] When we use SOCIAL LOGIN (like facebook, google login) we can use passport.js there is a lot of strategy to use(Facebook Strategy, github Strategy etc..). these strategies help us to login by these sites. you can remember these process. you already used it a lot. process of passport-facebook (use session) choose what strategy to login with click choosed strategy link redirect to strategy site(fa..