-
Notifications
You must be signed in to change notification settings - Fork 0
/
RandomNumber.js
31 lines (23 loc) · 1018 Bytes
/
RandomNumber.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactBootstrap = require("react-bootstrap");
var _lodash = require("lodash");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const ButtonComponent = () => {
const [random, setRandom] = _react.default.useState(0);
const data = {
"name": "Miracle",
"n": "d"
};
console.log("lodash pick function result is ", JSON.stringify((0, _lodash.pick)(data, ["name"])));
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactBootstrap.Button, {
variant: "primary",
onClick: () => setRandom(Math.floor(Math.random() * 100 + 1))
}, "Primary"), "Random number is ", random, /*#__PURE__*/_react.default.createElement("br", null), "Lodash pick example is consoled");
};
var _default = ButtonComponent;
exports.default = _default;