UNPKG

elmer-ui-core

Version:

web app framework

28 lines (25 loc) 919 B
// import { useEffect, useCallback, useContext, useComponent, useState } from "../src/hooks"; import "./Async.less"; // import { withI18n, FormatMessage, withRouter } from "../src/widget"; // const WithContextAsyncApp = ({ location }) => { // useComponent("FormatMessage", FormatMessage); // return `<div style="display: block;border: 1px solid red;"> // <label style="display: block;">Async Component</label> // <FormatMessage lngId="asyncApp"/> // </div>`; // }; // const MyAsyncApp = withRouter()(withI18n({ // i18n: { // "en-GB": { // asyncApp: "This is Async App" // }, // "zh-CN": { // asyncApp: "这是一个异步组件" // } // } // })(WithContextAsyncApp)); export default (props) => { // useComponent("DefectApp", MyAsyncApp); console.log("----", props); return "<h2>Hello elmer{{props.test}}</h2>"; }