UNPKG

unitejs-packages

Version:

Packages for use with UniteJS.

31 lines (26 loc) 653 B
/** * Example of lodash usage. * * @export * @class ExampleLodash */ import _ from "lodash"; import React from "react"; export class ExampleLodash extends React.Component { /** * Creates an instance of ExampleLodash. */ constructor(props, context) { super(props, context); const objA = {name: "bob", car: "porsche"}; const objB = {name: "bill", age: 40}; this.state = { result1: JSON.stringify(_.assign(objA, objB)) }; } /** * Render the component. * @returns {JSX.Element} */ render() { return <span id="lodash-example">{this.state.result1}</span>; } }