From 86011c7637be764f7c5e7c7b98325269b1782d81 Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Tue, 23 Jul 2024 16:01:30 +0900 Subject: [PATCH 1/2] =?UTF-8?q?build:=20recoil=20=EC=84=A4=EC=B9=98=20#47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package-lock.json | 27 ++++++++++++++++++++++++++- frontend/package.json | 3 ++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 102f796c5..6ddf923f5 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -13,7 +13,8 @@ "@tanstack/react-query": "^5.51.1", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-router-dom": "^6.24.1" + "react-router-dom": "^6.24.1", + "recoil": "^0.7.7" }, "devDependencies": { "@babel/cli": "^7.24.8", @@ -11197,6 +11198,11 @@ "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, + "node_modules/hamt_plus": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hamt_plus/-/hamt_plus-1.0.2.tgz", + "integrity": "sha512-t2JXKaehnMb9paaYA7J0BX8QQAY8lwfQ9Gjf4pg/mk4krt+cmwmU652HOoWonf+7+EQV97ARPMhhVgU1ra2GhA==" + }, "node_modules/handle-thing": { "version": "2.0.1", "dev": true, @@ -16826,6 +16832,25 @@ "node": ">= 10.13.0" } }, + "node_modules/recoil": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/recoil/-/recoil-0.7.7.tgz", + "integrity": "sha512-8Og5KPQW9LwC577Vc7Ug2P0vQshkv1y3zG3tSSkWMqkWSwHmE+by06L8JtnGocjW6gcCvfwB3YtrJG6/tWivNQ==", + "dependencies": { + "hamt_plus": "1.0.2" + }, + "peerDependencies": { + "react": ">=16.13.1" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, "node_modules/redent": { "version": "3.0.0", "dev": true, diff --git a/frontend/package.json b/frontend/package.json index e9a32bb8f..e11f74c59 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,7 +23,8 @@ "@tanstack/react-query": "^5.51.1", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-router-dom": "^6.24.1" + "react-router-dom": "^6.24.1", + "recoil": "^0.7.7" }, "devDependencies": { "@babel/cli": "^7.24.8", From 7b5cc9aedc87c572556a4601bf42e7d8be935d49 Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Tue, 23 Jul 2024 16:05:58 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20recoil=20Provider=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=20#47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/index.tsx | 11 +++++++---- frontend/src/mocks/wrapper.tsx | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 516225771..ebbb031e0 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -1,6 +1,7 @@ import { Global, ThemeProvider } from '@emotion/react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import ReactDOM from 'react-dom/client'; +import { RecoilRoot } from 'recoil'; import App from './App'; import GlobalStyle from './styles/GlobalStyle'; @@ -21,10 +22,12 @@ const enableMocking = async () => { enableMocking().then(() => { ReactDOM.createRoot(document.getElementById('root')!).render( - - - - + + + + + + , ); }); diff --git a/frontend/src/mocks/wrapper.tsx b/frontend/src/mocks/wrapper.tsx index 1a9ac015f..62a3f0c39 100644 --- a/frontend/src/mocks/wrapper.tsx +++ b/frontend/src/mocks/wrapper.tsx @@ -1,6 +1,7 @@ import { Global, ThemeProvider } from '@emotion/react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { PropsWithChildren } from 'react'; +import { RecoilRoot } from 'recoil'; import GlobalStyle from '@/styles/GlobalStyle'; import { Theme } from '@/styles/Theme'; @@ -16,10 +17,12 @@ const queryClient = new QueryClient({ const wrapper = ({ children }: PropsWithChildren) => { return ( - - - {children} - + + + + {children} + + ); };