-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Refactored 🧠 Overmind Hacktober | /app/pages/Sandbox/SignOutNoticeModal/index.js : refactor to replace Cerebral with Overmind #2655
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
Conversation
|
This pull request is automatically deployed with Now. Latest deployment for this branch: https://codesandbox-cl-git-fork-nileshpatel17-refactor-signoutno-a80d33.codesandbox1.now.sh |
4b4934f to
b796fed
Compare
| import { Container, Heading, Explanation } from './elements'; | ||
|
|
||
| function SignOutNotice({ signals }) { | ||
| function SignOutNotice() { |
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.
| function SignOutNotice() { | |
| export const SignOutNotice = () => { |
Let's change this to an arrow function and use a named export here. This will necessitate updating import references across the code base to replace the current default export, but this is our preferred way of handling imports/exports.
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.
changed to arrow function. Seems this component has not used yet, hence did not find any references across the code.
| } | ||
|
|
||
| export default inject('store', 'signals')(observer(SignOutNotice)); | ||
| export default SignOutNotice; |
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.
| export default SignOutNotice; |
Don't need this line since we'll be using a named export.
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.
removed default import
b796fed to
4f363fd
Compare
|
Thanks for this PR!! |
What kind of change does this PR introduce?
This is part of the requested refactor for hacktoberfest mentioned in #2621.
What is the current behavior?
Previously it was utilizing inject and hooksObserver from app/componentConnectors.
#2621
What is the new behavior?
Prefers useOvermind over inject
What steps did you take to test this?
Checklist