Hot-renderer is not working with latest react version

Tags: #<Tag:0x00007f0b0fe36dd8>

Hi all,

the Hot-renderer feature is not working with latest react.js version 18, but is working fine with react version 17.

Please help !!!

Below is the pseudo code.

  const NameRenderer = (props: any): any => {
    const { value, row, cellProperties } = props
    const id = cellProperties.instance.getDataAtRow(row)[0]
    return <Link to={`/name/${id}`}>{value}</Link>
  }


<HotColumn data={'name'} readOnly>
   <NameRenderer hot-renderer />
</HotColumn>

Hi @abdul.rehman.khan

I checked with the simple renderer and everything works fine with React 18:

https://jsfiddle.net/aszymanski/4frco180/

Can you modify this example to show your issue?

actually the “Link” component from react-router-dom, isn’t working fine.
as you can see
https://jsfiddle.net/ea5shb28/1/

@abdul.rehman.khan

I investigated this issue deeper and it seems like it’s a problem within React 18, suggested solution is to turn off strict mode if you have it enabled.

the strict mode is already turned off, the issue still persist with or without strict mode

OK, I’ll need to investigate the issue further. Would it be possible for you to send me your project?

1 Like

No, I can’t the project is confidential.

Hi @abdul.rehman.khan

We managed to find a solution. You have to wrap your App component in BrowserRouter element to make it work correctly. Routing doesn’t work at all in jsFiddle so we moved the example to different sandbox:

Let me know if that solution also works for you.