-
Notifications
You must be signed in to change notification settings - Fork 7
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
Enable Result to display different status icon #109
Conversation
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.
In short, this does not work, as comp never been called again after initializing. I strongly suggest you to read the react tutorial before continuing.
Also, please run yarn prettier
in client folder to clean up your style.
<div | ||
style={{ | ||
const Result = function Result(status, title, intro) { | ||
let comp; |
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.
Comp is never used in rendering.
|
||
if ( { status } === "success" ) { | ||
comp = ( | ||
<div style={{ |
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.
Please do not loop through things that is not changed.
|
||
return ( | ||
<div> | ||
{ status, title, intro } |
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 are simply displaying the props.
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.
Yeah this was from me just trying to figure out and understand the syntax of Return. This was just a testing measure and will be changed.
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 have marked the pull request as ready to review, but the change break a functional component.
I am worrying, since this is not something that you still need to figuring out after four weeks since initial task assignment.
I think I did it properly this time. I'm still trying to understand git.