[Node.js] Redirect 를 data 와 함께 보내는법

    Node 서버 내에서 redirect를 data와 함께 보내줘야 하는 일이 있었다. 방법이야? data=1234와 같이 url에 querystring으로 던져주면 되는 일이지만 원시적인 방법으로 하고 싶지 않아서 [ node redirect with data ]라는 키워드로 구글링을 하여서 아래의 스택오버플로(친구!)에서 필요한 정보를 얻을 수 있었다. https://stackoverflow.com/questions/19035373/how-do-i-redirect-in-expressjs-while-passing-some-context How do I redirect in expressjs while passing some context? I am using express to make a web app ..

    [생활코딩] 5# 리액트 공부

    state 와 props 의 차이점 Props Read only 이다 수정할수 없다 따라서 컴포넌트 내부에서 변경하려한면 에러가 뜬다 render(){ this.props.title = "hi"//error return( {this.props.title} {this.props.desc} ) } CRUD CRUD 를 위한 버튼들을 만들어 주도록 하자 carete update Delete 의 경우는 link 의 개념으로 잡는데아닌 오퍼레이션의 기능을 하는 버튼을 만들어야 한다 위의 컨트롤 부분 소스를 다른 컴포넌트 js 파일로 분리 시키자 import React,{ Component } from 'react'; import logo from './logo.svg'; import TOC from "./comp..

    [생활코딩] 4# 리액트 공부

    컴포넌트 이벤트 이번에는 컨텐츠를 누르면 그 컨텐츠에 해당하는 정보를 읽을수 있도록 만들어준다 constructor(props){//랜더하기전에 초기화 해주고 싶은코드는 constructor 안에 써야한다. super(props); this.state = { mode:"read", selected_content_id :2, subject:{title : 'WEB', sub : 'world wide web'}, welcome: {title: 'welcome',desc: 'welcome react'}, contents :[ {id : 1, title : 'HTML', desc : 'HTML is for ...'}, {id : 2, title : 'CSS', desc : 'CSS is for ...'}, {i..

    [생활코딩] 3# 리액트 공부

    바인드 엮는다 묶어준다는 뜻 바인드를 쓸때 render 라는 함수가 호출될때 this 는 컴포넌트 자신을 가리킨다. render(){ var _title, _desc = null; if (this.state.mode === "welcome") { _title = this.state.welcome.title; _desc = this.state.welcome.desc; } else if (this.state.mode === "read") { _title = this.state.contents[0].title; _desc = this.state.contents[0].desc; } return ( {/* */} {this.state.subject.title} {this.state.subject.sub} ); }..