🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Francisco Paglia
    Francisco Paglia
    773 Points

    Shouldn't handleAddPlayer use a function to pass the prev. state value to the spread operator?

    Posted November 5, 2021 9:15pm by Francisco Paglia
    Francisco Paglia
    773 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    0 Answers

  • James Crosslin
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    James Crosslin
    Full Stack JavaScript Techdegree Graduate 16,882 Points

    If you chose to try this course with React hooks, it can start to get tricky here. My solution if you're struggling

    Posted March 20, 2021 3:41am by James Crosslin
    .a{fill-rule:evenodd;}techdegree seal-36
    James Crosslin
    Full Stack JavaScript Techdegree Graduate 16,882 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    0 Answers

  • Tyler Garner
    Tyler Garner
    1,623 Points

    State Value of AddPlayerForm not updating on text input

    Posted March 10, 2021 7:17pm by Tyler Garner
    Tyler Garner
    1,623 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    3 Answers

  • erkany
    erkany
    7,189 Points

    How name argument passing through App.js from AddPlayerForm class?

    Posted July 11, 2020 11:27pm by erkany
    erkany
    7,189 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • Joseph Michelini
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Joseph Michelini
    Python Development Techdegree Graduate 18,692 Points

    What are the syntax rules for adding component properties in React?

    Posted June 22, 2020 12:17pm by Joseph Michelini
    .a{fill-rule:evenodd;}techdegree seal-36
    Joseph Michelini
    Python Development Techdegree Graduate 18,692 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • Tetsuya Yokoyama
    Tetsuya Yokoyama
    11,286 Points

    e.preventDefault(); is not working.......

    Posted May 31, 2020 7:09am by Tetsuya Yokoyama
    Tetsuya Yokoyama
    11,286 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • Umidjon Khaitov
    Umidjon Khaitov
    8,884 Points

    Text field is not getting cleared up after Submit event

    Posted January 25, 2020 9:38pm by Umidjon Khaitov
    Umidjon Khaitov
    8,884 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • miguel soriano
    miguel soriano
    2,177 Points

    my code is not working, can you let me know where I am wrong?

    Posted July 23, 2019 12:12am by miguel soriano
    miguel soriano
    2,177 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • Everton Carneiro
    Everton Carneiro
    15,994 Points

    Every player must have a unique id or the ids must follow the number of players in the array?

    Posted May 24, 2019 3:32pm by Everton Carneiro
    Everton Carneiro
    15,994 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    3 Answers

  • Richard Primas
    Richard Primas
    415 Points

    For some reason I'm receiving an error that states: 'this.state.players.map' is not a function. Any ideas?

    Posted May 11, 2019 8:23am by Richard Primas
    Richard Primas
    415 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • Juan Mendiola
    Juan Mendiola
    20,751 Points

    Confused with the handleAddPlayer method

    Posted May 9, 2019 2:48pm by Juan Mendiola
    Juan Mendiola
    20,751 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    2 Answers

  • Yoan Herrera
    Yoan Herrera
    21,137 Points

    is there a reason why we don't use preState inside the AddPlayerForm but we use it everywhere else in the app??

    Posted December 11, 2018 11:26pm by Yoan Herrera
    Yoan Herrera
    21,137 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • Saud Tauqeer
    PLUS
    Saud Tauqeer
    Courses Plus Student 8,099 Points

    on 7:25 timestamp.

    Posted October 8, 2018 6:12pm by Saud Tauqeer
    Saud Tauqeer
    Courses Plus Student 8,099 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

  • Saud Tauqeer
    PLUS
    Saud Tauqeer
    Courses Plus Student 8,099 Points

    Great resource for spread operator.

    Posted October 8, 2018 4:42pm by Saud Tauqeer
    Saud Tauqeer
    Courses Plus Student 8,099 Points
    • JavaScript
    • React Components (2018)
    • Managing State and Data Flow
    • Adding Items to State

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.