Sketch using p5-wrapper-react not receiving props on route change but is receiving them on page refresh, reload

Am facing an interesting challenge here. Have a somewhat straightforward architecture where i am passing props into my sketch via:

  p5.updateWithProps = props => {
      if (props.isLoading) {
        isLoading = props.setIsLoading
      }

      if (props.nftAttributes) {
        nftAttributes = props.setNftAttributes
      }
   };

The sketch loads and runs fine when i refresh the page and those functions are passed into the props fine, however when i access the page via a route change it appears that the updateWithProps function is not running prior to my draw function thus making those functions still undefined.

Happy to paste more code if it’s helpful!