Skip to content

Comments

Chaya Otikor: Stretch#239

Open
cotikor-public-plaid wants to merge 3 commits intobloominstituteoftechnology:masterfrom
cotikor-public-plaid:master
Open

Chaya Otikor: Stretch#239
cotikor-public-plaid wants to merge 3 commits intobloominstituteoftechnology:masterfrom
cotikor-public-plaid:master

Conversation

@cotikor-public-plaid
Copy link

No description provided.

@cotikor-public-plaid cotikor-public-plaid changed the title Chaya Otikor: Chaya Otikor: Stretch Nov 28, 2018
Copy link

@szincone szincone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great project. I love that you're still using things we've learned in past project. You also seem to be getting on another level w/ styled-components, I'm learning a lot from reviewing your code, especially when it comes to styled components.


import NavBar from './components/NavBar';

const GlobalStyle = createGlobalStyle`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job incorporating styled-components. I really didn't like them at first and stopped using them after last week, but I've since started using them more and more and I'm a big fan now. They are really powerful, I just didn't understand them. I'm glad your using them.


export default App;

App.propTypes = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job incorporating things from the previous lessons. I haven't seen anybody use prop-types on this assignment yet. It's great that your keeping you skills strong.

<React.Fragment>
{props.list.slice(1, 7).map((item, index) =>
item.name === category ? (
<React.Fragment>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key always needs to be in the parent of whatever your looping or mapping over. So if you moved the key={index that you did on line 43, inside this fragment like this <React.Fragment key={index}>, you would get rid of that error message in the console.

import PropTypes from 'prop-types';
import { keyframes } from 'styled-components';

const fadeIn = keyframes`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're getting really good with styled components.

<Route
path={'/:category'}
render={({match})=>
<SubNav {...props} list={props.list} match={match}/>}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The {...props} includes match, location, and history. You use those a lot in React-Router so anytime you see {...props}, it's passing those 3. So you don't really need to pass match down. (although the way you did your assignment, you still need to pass it down, because just changing line 26 match to props breaks the whole thing.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants