'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');

var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);

exports['default'] = useForceUpdate;

var _react = require('react');

var React = _interopRequireWildcard(_react);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

function useForceUpdate() {
    var _React$useReducer = React.useReducer(function (x) {
        return x + 1;
    }, 0),
        _React$useReducer2 = (0, _slicedToArray3['default'])(_React$useReducer, 2),
        forceUpdate = _React$useReducer2[1];

    return forceUpdate;
}
module.exports = exports['default'];