Skip to main content
Module

x/aleph/mod.ts>withDeno

The Full-stack Framework in Deno.
Very Popular
Go to Latest
function withDeno
import { withDeno } from "https://deno.land/x/aleph@v0.3.0-alpha.7/mod.ts";

withDeno allows you to use useDeno hook with class component.

class MyComponent extends React.Component {
  render() {
    return <p>{this.props.deno.version}</p>
  }
}
export default withDeno(() => ({ version: Deno.version.deno }))(MyComponent)

Parameters

callback: () => (T | Promise<T>)
  • hook callback.
optional
revalidate: number
  • revalidate duration in seconds.