Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Namespaces

Functions

Functions

Fragment

  • Fragment(): any
  • An artificial Fragment component that is only used as a temporary collection of other items in places where JSX only allows a single item. Our JSX factory function creates a virtual node for each of its children and the function is never actually called.

    The Fragment component can be used directly; however, the better way is to set the jsxFragmentFactory compiler option in the tsconfig.json file to mim.Fragment and use the TypeScripts <>...</> construct as in the following example:

        import * as mim from "mimbl"
    .....
    render()
    {
    return <>
    <div1/>
    <div2/>
    <div3/>
    </>
    }

    Note that you must have the mim.Fragment function in scope (using import * as mim from "mimbl") even though it is not used explicitly.

    Returns any

jsx

  • jsx(tag: any, props: any, ...children: any[]): any
  • JSX Factory function. In order for this function to be invoked by the TypeScript compiler, the tsconfig.json file must have the following options:

    "compilerOptions":
    {
    "jsx": "react",
    "jsxFactory": "mim.jsx",
    "jsxFragmentFactory": "mim.Fragment"
    }

    The .tsx files must import the mimbl module as mim:

    import * as mim from "mimbl"
    

    This ensures that you have the mim.jsx function in scope even though it is usually not used explicitly.

    Parameters

    • tag: any
    • props: any
    • Rest ...children: any[]

    Returns any