Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { render, importComponent } from 'hops';
import * as React from 'react';
import Headline from './headline';
const Content = importComponent(() => import('./content'));
export default render(
<>
<content>
);
</content>
Header,
importComponent,
Miss,
render,
withServerData,
useServerData,
Status,
withConfig,
useConfig,
} from 'hops';
import React from 'react';
import { Link, Redirect, Route, Switch } from 'react-router-dom';
import FlowText from './flow-text';
const Text = importComponent(() => import('./text'));
const ServerDataHoC = withServerData(({ serverData }) => (
<output>{serverData.method}</output>
));
const ServerDataHook = () => {
const serverData = useServerData();
return <output>{serverData.method}</output>;
};
const ConfigHoC = withConfig(({ config: { hoc } }) => <h1>{hoc}</h1>);
const ConfigHook = () => {
const config = useConfig();
import React from 'react';
import { importComponent, render } from 'hops';
const Text = importComponent('./text');
const loader = load =>
Promise.race([new Promise((_, reject) => setTimeout(reject, 10000)), load()]);
const renderText = ({ Component, loading, ...props }) => {
return loading ? <p>Fetching content…</p> : ;
};
export function App() {
return