Options
All
  • Public
  • Public/Protected
  • All
Menu

A register of components to use within library components, with sensible defaults. Many users will never need to interact with this. It exists to support customization of library component behaviour.

Hierarchy

  • ComponentRegister

Index

Properties

Methods

Properties

Static Link

Link: LinkComponentType = defaultComponentRegisterOptions.components.Link

The LinkComponentType to allow this library to hook into routers or other custom linking libraries.

Defaults to "a". See ComponentRegisterComponents.Link and defaultComponentRegisterOptions.

Methods

Static init

  • Initializes ComponentRegister with the provided options.

    This is how you set component options en masse, and is the preferred method for providing custom components.

    // Using `Link` from React Router.
    ComponentRegister.init({
      components.
      Link: ({ className, href, children }) => (
        <ReactRouter.Link className={className} to={href}>
          {children}
        </ReactRouter.Link>
      )
    });

    Parameters

    • Default value options: ComponentRegisterOptions = {}

      Options to customize the underlying components used by library components.

    Returns void

Static reset

  • reset(): void

Generated using TypeDoc