분류 전체보기(193)
-
React 클래스형 + (코드 분리 방식)
원문 출처 : https://ljh86029926.gitbook.io/coding-apple-react/1/component-of-react#undefined-1 Component Of React - React 이런식으로 하나의 HTML파일에 header, main, footer부분까지 하나의 파일에 작성하게 됩니다. 그러나 리액트는 컴포넌트 구조로 작성을 할 수 있기 때문에 각각의 부분을 분리해서 작업을 진행할 수 ljh86029926.gitbook.io
2023.04.05 -
React 함수형 선언방식
npx create-react-app 을 실행하면 생성되는 src/App.js 에서 볼 수 있다. import logo from './logo.svg'; import './App.css'; function App() { return ( Edit src/App.js and save to reload. Learn React ); } export default App;
2023.04.05 -
React 방식으로 요소 추가하기
https://stackoverflow.com/questions/66966134/how-to-pass-child-element-to-parent-in-react How to pass child element to parent in React How can i pass child element to parent element and then render it using React? Example of my code: let persons = [{name: 'Bill', age: '25'}, {name: 'John', age: '35'}]; // etc etc function stackoverflow.com
2023.04.05 -
render 테스트
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; const myElement = I Love JSX!; //const divElement = React.createElement('div') const myElement2 = React.createElement('h1', {}, 'I do not use JSX!'); const root = ReactDOM.createRoot(document.getElementById('root')); root.render(myElement); function runAfter() { root.render(myElement2); } setTimeout(runAfte..
2023.04.05 -
정규식을 활용한 Underscore / Camel Case 전환
1. Underscore to Camel Case 찾을 내용 : _(.) 바꿀 내용 : \U$1 노트패드++ 에서 통하는 방법이다. 다만, 저 방법을 적용하기 전에 우선 모두 소문자로 변환해야 한다. 그렇게 하지 않으면 요렇게 되지~~ (적용 전 : I_LOVE_SALSA, 적용 후 : ILOVESALSA) 모두 소문자로 변환하면 (전 : I_LOVE_SALSA, 후 : i_love_salsa) 하지만 거치는 과정이 다소 번거롭다. 이런 기능이 플러그인으로 존재한다면 감사히 편리하게 사용할텐데.. 해설) () 는 그룹(묶음)이다. . 은 어느 한 문자 또는 숫자를 의미한다. 따라서 _(.) 는 I_LOVE_SALSA 에서 _L, _S 가 해당된다. \U 는 뒤에 따라오는 문자를 알파벳 대문자로 변환한다...
2023.04.05 -
[리눅스/윈도] 스프링 기반 프로젝트 - 부분 백업 스크립트
큰 사이트의 프로젝트에 참여할 때 본인이 작업한 소스만 백업하고 싶을 때 쓰면 유용하다. 본 스크립트는 넥사크로 프로젝트를 기준으로 작성하였다. 윈도10에는 WSL 이 있는데 보안규정에 위배될까봐 삭제했다가 BASH 와 GNU 유틸리티가 너무 그리운 나머지 거들떠 보지도 않던 Cygwin 을 설치하게 되었다. #!/usr/bin/bash # Copyright [2021-2022] [한정훈 & papercraft.tistory.com & 종이와 쉼터] # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may..
2023.04.05