# Vidly project: Delete movie event handler not working

**URL:** <https://forum.codewithmosh.com/t/vidly-project-delete-movie-event-handler-not-working/14255>\
**Category:** React\
**Created:** [August 9, 2022, 12:55pm UTC](https://forum.codewithmosh.com/t/vidly-project-delete-movie-event-handler-not-working/14255 "2022-08-09T12:55:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josie](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Josie](https://forum.codewithmosh.com/u/Josie)\
**Post date:** [August 9, 2022, 12:55pm UTC](https://forum.codewithmosh.com/t/vidly-project-delete-movie-event-handler-not-working/14255/1 "2022-08-09T12:55:30Z")

</div>

I made an alternative implementation of the Vidly project using React Hooks, and got stuck at this issue: **my button is not deleting the movie item**.

I’m looking to understand what went wrong in the way I approached updating the state in my **MovieList** component.

Here is the project uploaded online, it opens at the file the issue is coming from:

> **[vidly - CodeSandbox](https://codesandbox.io/s/github/Josie-N/my-next-movie?file=%2Fsrc%2FMovies.js)**
>
> vidly using @testing-library/jest-dom, @testing-library/react, @testing-library/user-event, bootstrap, font-awesome, react, react-dom, react-scripts, web-vitals

Thank you for your time!

---

<div class="post-metadata">

**Author:** ![Josie](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Josie](https://forum.codewithmosh.com/u/Josie)\
**Post date:** [August 19, 2022, 11:16am UTC](https://forum.codewithmosh.com/t/vidly-project-delete-movie-event-handler-not-working/14255/2 "2022-08-19T11:16:01Z")

</div>

If anybody is still interested, I fixed the issue!  
Deleting movie functionality is not working, plus the pagination. Written with React Hooks:

> **[broken-monad-ofdm8h - CodeSandbox](https://codesandbox.io/s/broken-monad-ofdm8h)**
>
> broken-monad-ofdm8h by Josie-N using @testing-library/jest-dom, @testing-library/react, @testing-library/user-event, bootstrap, bootstrap-icons, classnames, lodash, react, react-dom
