Coder Social home page Coder Social logo

redux-index-codealong's People

Contributors

crwhitesides avatar dependabot[bot] avatar gj avatar ihollander avatar jeffkatzy avatar lizbur10 avatar lukeghenco avatar maxwellbenton avatar rrcobb avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redux-index-codealong's Issues

Rendering Todo component as simple component

In the code along we are instructed to render the Todo component like this:
renderTodos = () => this.props.todos.map((todo, id) => <Todo key={id} text={todo} />)

I've tried rendering a simple component this way a few times and it has been unsuccessful for me. The way that I've gotten it to render is by actually invoking Todo(props).
renderTodos = () => this.props.todos.map((todo) => Todo(todo))

My repo is at: https://github.com/msteele96/redux-index-codealong-online-web-sp-000

I'd love to hear if this is a legitimate problem with rendering or if there is some other error in my code that forced me to find this workaround.

we can create

Need to add the letter c to change "an" to "can" in the sentence below:
"Now that we have a way to get data from Redux, we an create a presentational component to handle displaying our todos."

Thank you.

Codealong Uses Index as Key

Hi!

Quick note, since it's come up a lot during the React lectures, this codealong uses Todos' index as a key in:

renderTodos = () => this.props.todos.map((todo, id) => <Todo key={id} text={todo} />)

Recommend finding a way to add an id property to todo or just using the text as a key here, as in every lecture and code review the lead instructors and coaches are being very explicit about not using the index as a key value because of the problems it can cause with React caching arrays of components

Instructions tell us to do something that's already done...

We can confirm this is working by adding a log in the render of TodosContainer and then adding TodosContainer to our App component so it will be rendered.

That's already in the app, so I submit:

We can confirm this is working by adding a log in the render of TodosContainer, or by adding some text content to the currently-empty div. Since we've already added TodosContainer to our App component, it will be rendered right away.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.