@tanstack/react-table 8.0.0-alpha.6 → 8.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4767,9 +4767,23 @@
4767
4767
  },
4768
4768
  useTable: function useTable(options) {
4769
4769
  var instanceRef = React__namespace.useRef(undefined);
4770
- var rerender = React__namespace.useReducer(function () {
4770
+ var unsafeRerender = React__namespace.useReducer(function () {
4771
4771
  return {};
4772
4772
  }, {})[1];
4773
+ var isMountedRef = React__namespace.useRef(false);
4774
+ var rerender = React__namespace.useCallback(function () {
4775
+ if (!isMountedRef.current) {
4776
+ return;
4777
+ }
4778
+
4779
+ unsafeRerender();
4780
+ }, []);
4781
+ React__namespace.useLayoutEffect(function () {
4782
+ isMountedRef.current = true;
4783
+ return function () {
4784
+ isMountedRef.current = false;
4785
+ };
4786
+ });
4773
4787
 
4774
4788
  if (!instanceRef.current) {
4775
4789
  instanceRef.current = createTableInstance(options, rerender);