-
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
changes for updating functional components #11
base: master
Are you sure you want to change the base?
changes for updating functional components #11
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.
Pls take a look at the comments related to formatting, naming, modularity, and comments
@@ -9,11 +9,11 @@ | |||
"@testing-library/user-event": "^7.2.1", |
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.
Let's try fixing all the vulnerabilities for the npm modules
} | ||
}); | ||
}); | ||
function 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.
Let's try renaming the component naming to something meaningful
{ Negative: [] }, | ||
{ Neutral: [] }, | ||
]); | ||
const [PoisitivePage, setPoisitivePage] = useState(1); |
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 fix the spelling of the state variable here
const apiData = useSelector((state) => state.getDataReducer.apiData); | ||
const dispatch = useDispatch(); | ||
useEffect(() => { | ||
dispatch(getData()); | ||
|
||
/* Data format |
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.
Add comments at the top of the components for 3 formats:
- raw data from amazon format
- data passed through sentiment module format
- local state array format
let res = sentiment.analyze( | ||
content.review_body + content.review_headline | ||
); | ||
let temp, category; |
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.
Pls try using better naming of variables in general
} | ||
} | ||
|
||
renderCardtext(contentVal, category) { |
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.
Can we pls move this rendering of child components to a new component?
@@ -118,95 +117,83 @@ class App extends React.Component { | |||
}); | |||
} | |||
|
|||
renderPagenumbers(contentVal, category) { |
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.
Can we pls move this rendering of child components to a new component?
href="https://s3.amazonaws.com/amazon-reviews-pds/tsv/sample_us.tsv" | ||
target="_blank" without rel="noreferrer" | ||
> | ||
{" "} |
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.
Pls find out what this empty string does and remove if unessential
let contentInner = content[category]; | ||
let imgname = Object.keys(content)[0].toLowerCase(); | ||
return ( | ||
<Card key={i} style={{ minWidth: "18rem" }}> |
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.
Pls move the styles here to css. Refrain from inline styles in general.
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
-no
Other information: