Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Components

Aniket Prajapati edited this page Jun 19, 2020 · 2 revisions

FireJS exports the following components for faster and easy to make webpages

  • Link: Used for navigating pages (in-project only). Preloads page content onMouseEnter event.

  • Head: Injects children to head element. A wrapper around react-helmet. Allows SSR.

  • LazyLoad Enables lazy loading and SSR of components.

Example

import Link from "@eadded/firejs/Link"
import Head from "@eadded/firejs/Head";
import LazyLoad from "@eadded/firejs/LazyLoad.js";

export default () => {
    const Markdown = LazyLoad(import("markdown-to-jsx"));
    return (
        <div>
            <Head>
                <title>Index Page</title>
            </Head>
            <Link to="/about">Link to About Page</Link>
            <Markdown>
                # This is a lazy loaded component
            </Markdown>
        </div>
    )
}

🏡 Home

Getting Started
Advance
Tips and Tricks

🗒️ All examples in this documentation are written in typescript

Clone this wiki locally