Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • Joshua Ouma
    Joshua Ouma
    20,865 Points

    Why must we call props.removePlayer(props.id) inside an anonymous function for the remove button to work?

    Posted December 1, 2021 4:14pm by Joshua Ouma
    Joshua Ouma
    20,865 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    2 Answers

  • Joshua Gage
    Joshua Gage
    4,010 Points

    removePlayer function not working

    Posted July 2, 2021 8:33pm by Joshua Gage
    Joshua Gage
    4,010 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • HONGYUAN QIU
    HONGYUAN QIU
    1,113 Points

    Why do we use the anonymous function for the removePlayer in Player?

    Posted June 11, 2021 6:57pm by HONGYUAN QIU
    HONGYUAN QIU
    1,113 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    2 Answers

  • dodders
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    dodders
    Python Development Techdegree Graduate 38,680 Points

    Why does Guil create the handleRemovePlayer under App and not Player?

    Posted May 3, 2021 5:20pm by dodders
    .a{fill-rule:evenodd;}techdegree seal-36
    dodders
    Python Development Techdegree Graduate 38,680 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    3 Answers

  • Ayman Elash
    Ayman Elash
    3,221 Points

    A clear example on prevState ?

    Posted March 27, 2021 8:42pm by Ayman Elash
    Ayman Elash
    3,221 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    3 Answers

  • L W
    L W
    6,234 Points

    around 03:20 why is it {player.id} instead of {this.state.player.id} since player is inside of a state?

    Posted August 15, 2020 2:51am by L W
    L W
    6,234 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Ewerton Luna
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Ewerton Luna
    Full Stack JavaScript Techdegree Graduate 24,031 Points

    Why does he passes a id prop to the Player component if there's already a key prop that could be used instead?

    Posted February 25, 2020 2:53pm by Ewerton Luna
    .a{fill-rule:evenodd;}techdegree seal-36
    Ewerton Luna
    Full Stack JavaScript Techdegree Graduate 24,031 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Joseph Butterfield
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Joseph Butterfield
    Full Stack JavaScript Techdegree Graduate 16,430 Points

    How do I console.log() inside of a Class?

    Posted February 6, 2020 9:21pm by Joseph Butterfield
    .a{fill-rule:evenodd;}techdegree seal-36
    Joseph Butterfield
    Full Stack JavaScript Techdegree Graduate 16,430 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • fairest
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    fairest
    Full Stack JavaScript Techdegree Graduate 19,303 Points

    Why mention 'What's New in React 16' at the end of the course?!?!

    Posted January 14, 2020 11:16pm by fairest
    .a{fill-rule:evenodd;}techdegree seal-36
    fairest
    Full Stack JavaScript Techdegree Graduate 19,303 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Jay McCormick
    Jay McCormick
    6,646 Points

    Anonymous Function in OnClick

    Posted December 3, 2019 8:09pm by Jay McCormick
    Jay McCormick
    6,646 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Felix Ding
    Felix Ding
    5,144 Points

    How come we don't have to bind thisArg in the onClick event for remove player?

    Posted August 5, 2019 6:41am by Felix Ding
    Felix Ding
    5,144 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Gremyko Coleman
    Gremyko Coleman
    9,756 Points

    How would we create the handleRemovePlayer function to the Player, component, if the player componen was a class instead

    Posted May 22, 2019 4:14am by Gremyko Coleman
    Gremyko Coleman
    9,756 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Gremyko Coleman
    Gremyko Coleman
    9,756 Points

    handleRemovePlayer function

    Posted May 20, 2019 5:31am by Gremyko Coleman
    Gremyko Coleman
    9,756 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    2 Answers

  • Zijun Liao
    Zijun Liao
    13,409 Points

    handleRemovePlayer binding

    Posted March 6, 2019 12:53am by Zijun Liao
    Zijun Liao
    13,409 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • jlampstack
    jlampstack
    23,932 Points

    handleRemovePlayer() function ... naming convention???

    Posted February 21, 2019 11:44am by jlampstack
    jlampstack
    23,932 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Truman Smith
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Truman Smith
    Full Stack JavaScript Techdegree Graduate 17,901 Points

    How is score preserved after a player is removed?

    Posted January 2, 2019 6:37am by Truman Smith
    .a{fill-rule:evenodd;}techdegree seal-36
    Truman Smith
    Full Stack JavaScript Techdegree Graduate 17,901 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    2 Answers

  • brevans26
    brevans26
    15,198 Points

    p => p.id !== id

    Posted November 7, 2018 2:11pm by brevans26
    brevans26
    15,198 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    2 Answers

  • Sonya Trachsel
    Sonya Trachsel
    13,674 Points

    Getting an error "props.removePlayer isn't a function"

    Posted November 2, 2018 7:26pm by Sonya Trachsel
    Sonya Trachsel
    13,674 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    1 Answer

  • Otto linden
    Otto linden
    5,857 Points

    Is it only me that have no id what he is talking about? xD

    Posted October 15, 2018 6:48pm by Otto linden
    Otto linden
    5,857 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    8 Answers

  • kenweed
    kenweed
    12,156 Points

    I could not Delete Players, what am I missing?

    Posted September 30, 2018 11:11pm by kenweed
    kenweed
    12,156 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    3 Answers

  • Ceil-Ian Maralit
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Ceil-Ian Maralit
    Front End Web Development Techdegree Graduate 19,434 Points

    What is wrong with my code?

    Posted September 30, 2018 10:54am by Ceil-Ian Maralit
    .a{fill-rule:evenodd;}techdegree seal-36
    Ceil-Ian Maralit
    Front End Web Development Techdegree Graduate 19,434 Points
    • JavaScript
    • React Basics (2018)
    • Understanding State
    • Remove Items From State

    3 Answers

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

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord