Skip to content

Instantly share code, notes, and snippets.

View mintheon's full-sized avatar
🖋️
学习总是新鲜的!

MinHyun Lee mintheon

🖋️
学习总是新鲜的!
  • Seoul, Korea
  • 16:16 (UTC +09:00)
View GitHub Profile
@velopert
velopert / react-hot-loader.md
Created January 20, 2018 04:25
react-hot-loader.md

react-hot-loader 적용하기

react-hot-loader 는 코드가 변경되었을 때 페이지를 새로고침하지 않고 바뀐부분만 빠르게 교체해주는 라이브러리입니다. 비록, 리액트 어플리케이션을 개발 할 때 필수적인 개발도구는 아니지만, 앱의 규모가 커지면 개발서버가 수정될때마다 새로고침이 된다면 딜레이가 발생되어 개발의 흐름이 중간중간 1~6초씩 끊길 수도 있습니다. 특히, styled-components 를 사용하게 되는 경우엔, 스타일이 JS 안에 있어서, 스타일을 수정 할 때마다 새로고침이 된다는게 조금 불편할수도 있겠죠.

이렇게 자바스크립트 코드의 일부분만 교체하는 기능은 웹팩 개발서버의 기능이기 때문에, 라이브러리 없이도 코드를 조금 건들여주면 가능합니다. 하지만, 어플리케이션의 state 를 계속 유지하려면 과정이 복잡하기 때문에 라이브러리의 힘을 빌릴 필요가 있습니다.

이전에는, webpack 쪽에서 설정을 해야 될 것이 있었기 때문에, 무조건 yarn eject 를 해주어야 했지만, 이제는 바벨 설정만 하면 되므로 eject 하는 작업은 선택적입니다. 최신 react-hot-loader 는 굉장히 많이 편해졌답니다.

설치하기

@ihoneymon
ihoneymon / TestTemplate.java
Created September 20, 2017 01:18
@before, @after 를 제대로 활용하지 못해서 슬퍼...
import com.wirebarley.webservice.domain.Tx;
import com.wirebarley.webservice.domain.User;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runners.Parameterized;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collection;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 24, 2024 05:17
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@LeoHeo
LeoHeo / var-let-const.md
Last active July 19, 2024 11:52
javascript var, let, const 차이점

var, let, const 차이점은?

  • varfunction-scoped이고, let, constblock-scoped입니다.

  • function-scopedblock-scoped가 무슨말이냐?

var(function-scoped)

jsfiddle 참고주소

@andromedarabbit
andromedarabbit / gradle-commands.md
Last active October 30, 2022 08:13
자주 쓰는 Gradle 명령어

자주 쓰는 Gradle 명령어

단위 테스트 돌리기

gradle test

단위 테스트는 건너뛰고 빌드하기

@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active June 27, 2024 17:48
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
/* Custom styles for Confluence (included for all themes by default) */
/*****************************************************
** PUT SPACE SPECIFIC STYLING HERE (NOT AT BOTTOM)
***************************************************/
#children-section
{
display : none;