Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13 feature state management recoil #25

Merged
merged 6 commits into from
Mar 15, 2023

Conversation

YoujeongPark
Copy link
Member

  1. recoil statement 추가
  2. host -> atoms 추가
  3. "atom effect localStorageEffect" 이건 좀 제가 study를 좀 더 해봐야할 것 같아요. (파트 혹은 정기 개발스터디 질문)
    (+) module federation typescript 추가 이슈 발생(host -> remote expose시 type 오류 발생? 추가 해결 필요) issue

1. use jwt
2. test login & logout

resolving: #11
related to: #11
axios server 연습 추가

#resolving : #11
#ref : #1
axios instance 추가

resolve: #11
host와 remote의 atoms를 공유합니다.
resolving : #15
1. 전역적 recoil 상태 추가
2. user 사용자 전역 recoil
3. 임시 count 추가 (예제)

resolved #15
@YoujeongPark YoujeongPark requested a review from nickkies March 12, 2023 06:56
Copy link
Contributor

@nickkies nickkies left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

fetch는 swr파일을 따로 만들어서 하지 않나요??
관련해서 기억 잘 안나네요 ㅠㅠ

그리고 url은 env설정 부탁드려요!

@@ -0,0 +1,41 @@
import axios from "axios";

const request = axios.create({
Copy link
Contributor

Choose a reason for hiding this comment

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

요걸 session으로 쓰면 될거같아요

);


export default request; //axios 인스턴스를 내보낸다.
Copy link
Contributor

Choose a reason for hiding this comment

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

Restfull 한 return을 return 하면 좋을거 같아요

instance return

return {
      get: (...params) => session.get(...params),
      post: (...params) => session.post(...params),
      put: (...params) => session.put(...params),
      patch: (...params) => session.patch(...params),
      delete: (...params) => session.delete(...params),
    };

저 return 을 하는 instance(request)를 retrun

<div>{user.username}</div>
</div>
<h2>{count}</h2>
<button onClick={() => increase()}>+</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

<button onClick={increase}>+</button>

</div>
<h2>{count}</h2>
<button onClick={() => increase()}>+</button>
<button onClick={() => reset()}>reset</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

<button onClick={resetCount}>reset</button>

@nickkies nickkies merged commit 36bf8a9 into develop Mar 15, 2023
@nickkies nickkies deleted the 13-feature-state-management-recoil branch March 15, 2023 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants