-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrade react/next version #10
Conversation
fixing... |
Coverage after merging update/react-next into main
Coverage Report
|
Coverage after merging update/react-next into main
Coverage Report
|
"webpack": "^5.75.0" | ||
}, | ||
"resolutions": { | ||
"react-test-renderer": "18.2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
どうにも現状ではreact18でstorybookを動作させるにはreact-test-rendererのバージョンを強制的に指定する必要がある模様
Coverage after merging update/react-next into main
Coverage Report
|
Coverage after merging update/react-next into main
Coverage Report
|
1 similar comment
Coverage after merging update/react-next into main
Coverage Report
|
"lint-staged": "^12.4.1", | ||
"nock": "^13.2.7", | ||
"prettier": "^2.6.2", | ||
"sass": "^1.52.3", | ||
"sass-loader": "^13.0.0", | ||
"storybook-addon-next-router": "^4.0.0", | ||
"next-router-mock": "^0.8.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
next13でnext/routerをインポートすると
you should only use "next/router" on the client side of your app.
と言われていしまうので、その対策として導入
Coverage after merging update/react-next into main
Coverage Report
|
1 similar comment
Coverage after merging update/react-next into main
Coverage Report
|
@@ -17,6 +17,7 @@ Array [ | |||
href="/login" | |||
onClick={[Function]} | |||
onMouseEnter={[Function]} | |||
onTouchStart={[Function]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(おそらく)React18の影響?
import { renderHook, act, RenderResult } from '@testing-library/react-hooks' | ||
|
||
import { useCSR } from '../useCSR' | ||
|
||
jest.mock('next/router') | ||
jest.mock('next/router', () => require('next-router-mock')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これで
you should only use "next/router" on the client side of your app.
と言われない
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
細かいですが、jest.mockはimportの後の行に書きましょう。
記載自体は問題ないです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正:26f04a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメントしたところ以外は問題ないですー
Coverage after merging update/react-next into main
Coverage Report
|
Summary
update next version to 13
update react version to 18