Skip to content
13 changes: 13 additions & 0 deletions src/core/State.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default class State {
constructor(state) {
this.state = state;
}

get() {
return this.state;
}

set(newState) {
this.state = newState;
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 마치, 데이터를 담는 그릇(Java에서 POJO 클래스)같은 데요.
이 질문이 여기서 하는 것이 적절한지는 모르겠는데요.
혹시나 해서 여쭐께요. Java에서는 get, set과 같은 것을 lombok의 @Getter 같은 것으로 함수를 적지 않아도 되는 도구가 있는데, Javascript에서도 있는지 궁금해요.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.