Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70902

Ionic React Hooks only fire once

$
0
0

@stanlindsey wrote:

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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70902

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>