webpack/examples/module-federation/src-c/LazyComponent.js

12 lines
356 B
JavaScript
Raw Normal View History

2020-06-04 08:48:12 +08:00
import React from "react";
import random from "lodash/random";
2020-06-04 08:48:12 +08:00
const Component = () => (
<div style={{ border: "5px solid darkgreen" }}>
<p>I'm a lazy Component exposed from container C!</p>
<p>I'm lazy loaded by the app and lazy load another component myself.</p>
<p>Using lodash in Remote: {random(0, 6)}</p>
</div>
);
export default Component;