You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm noticing that react-hot-loader is not refreshing the component when I change the column formatter function (it works when changing text or align attributes).
I plan to open an issue in the react-hot-loader repo, but I wanted to see if anyone else is using it in the context of react-hot-loader and noticing similar issues. The current workaround is to use key= Math.random() to force react to re-render the component.
I'm using react-hot-loader 4.12.12.
The text was updated successfully, but these errors were encountered:
If I change the formatter function, for example change the text, the effect won't hot reload until I force refresh. Again, this is issue is only observed with react-hot-loader (storybook it works, but they have their own hot-reloader implementation).
My current workaround is to generate a random key:
key={DataTable.hotKey()}
// A hack to make it work with react-hot-loader
DataTable.hotKey = () => {
if (module.hot) {
return Math.random();
}
return undefined;
};
I'm not sure if this is only local to my webpack/react-hot-loader setup or a general issue, I think we need a smaller reproduction. I really hope the new react fast refresh will iron those glitches out.
I'm noticing that react-hot-loader is not refreshing the component when I change the column formatter function (it works when changing text or align attributes).
I plan to open an issue in the react-hot-loader repo, but I wanted to see if anyone else is using it in the context of react-hot-loader and noticing similar issues. The current workaround is to use
key= Math.random()
to force react to re-render the component.I'm using react-hot-loader 4.12.12.
The text was updated successfully, but these errors were encountered: