Gazebo_simulation-Frontend/node_modules/@restart/hooks/cjs/useForceUpdate.js

17 lines
437 B
JavaScript
Raw Normal View History

2020-12-21 11:29:31 -04:00
"use strict";
exports.__esModule = true;
exports.default = useForceUpdate;
var _react = require("react");
function useForceUpdate() {
// The toggling state value is designed to defeat React optimizations for skipping
// updates when they are stricting equal to the last state value
var _useReducer = (0, _react.useReducer)(function (state) {
return !state;
}, false),
dispatch = _useReducer[1];
return dispatch;
}