@component-controls/react-router-integration

react-router integration to create stories documentation sites

Usage no npm install needed!

<script type="module">
  import componentControlsReactRouterIntegration from 'https://cdn.skypack.dev/@component-controls/react-router-integration';
</script>

README

Table of contents

In action

Live site

Overview

react-router integration plugin for webpack sites documenting your projects with component controls

  • Exports list of routes with their components.
  • Exports post-build routine to generate sitemaps and search indexes.

Getting started with webpack

API

ControlsPage

function

defined in @component-controls/react-router-integration/integrations/react-router-integration/src/index.tsx

parameters

Name Type
props*
Omit
type: "story" | "blog" | "page" | "tags" | "author" | string
docId: string
storyId: string
lastModified: string
docIndex: boolean
query: string
category: string
activeTab: string
userData: Record<string, any>
returns
FC<>
propTypes: WeakValidationMap<> | undefined
contextTypes: ValidationMap<> | undefined
defaultProps: Partial<P> | undefined
displayName: string | undefined

useRoutes

function

defined in @component-controls/react-router-integration/integrations/react-router-integration/src/index.tsx

parameters

Name Type
returns (ReactElement<>)[]