# Ionic React Hooks only fire once

**URL:** <https://forum.ionicframework.com/t/ionic-react-hooks-only-fire-once/180972>\
**Category:** Ionic React\
**Created:** [January 6, 2020, 11:25am UTC](https://forum.ionicframework.com/t/ionic-react-hooks-only-fire-once/180972 "2020-01-06T11:25:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanlindsey](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@stanlindsey](https://forum.ionicframework.com/u/stanlindsey)\
**Post date:** [January 6, 2020, 11:25am UTC](https://forum.ionicframework.com/t/ionic-react-hooks-only-fire-once/180972/1 "2020-01-06T11:25:53Z")

</div>

Hi,

I have a calendar view that displays a different day depending on a param in the url. (e.g. /day/2020-01-01/)  
I’m using the useState hook, but it only runs on the initial render, and then when you select another date to view you’re only ever stuck on the first date you selected.

`useIonViewWillEnter` does run, but updating state within that doesn’t work.

How can I force a functional component to rerender?

---

<div class="post-metadata">

**Author:** ![aaronksaunders](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aaronksaunders/32/13729_2.png) [@aaronksaunders](https://forum.ionicframework.com/u/aaronksaunders)\
**Post date:** [January 16, 2020, 5:06pm UTC](https://forum.ionicframework.com/t/ionic-react-hooks-only-fire-once/180972/2 "2020-01-16T17:06:38Z")

</div>

code? can you provide a sample
