Bojagi Docs

Bojagi Docs

  • Docs

›GETTING STARTED

GETTING STARTED

  • Quick Start
  • Frequently Asked Questions

TUTORIALS

  • Setup Bojagi With React and Storybook
  • Setup Bojagi With React and Without Storybook

DOCUMENTATION

  • Write Stories
  • CLI
  • .bojagirc
  • Continuous Integration

FAQ

Frequently Asked Questions

We will fill this up as we go, bare with us :)

If you have any questions that aren't covered yet, feel free to write us to support@bojagi.io.

Can I use Bojagi with my existing Storybook stories?

Yes.

Bojagi stories work the same way storybooks stories work. In most cases Bojagi understands this file out of the box. Using some Storybook plugins might break them for us in some cases, please contact us in that case.

NOTE: if you have a path other than ./src/**/*.stories.js configured in your storybook/main.js you might need to adjust the storyPath value in the Bojagi configs in order for bojagi to find them.

My story crashes when using the react router Link component

React router Link needs to be inside a router. We recommend using a global decorator and MemoryRouter to wrap all your stories.

// .bojagi/decorator.js
import React from 'react';
import { MemoryRouter } from 'react-router';

const withDecorator = story => <MemoryRouter>{story()}</MemoryRouter>;

export default withDecorator;

My components are missing styling

The reason for this might be that you need to import your CSS globally and not do it per component. If you are doing this in your app, you can use a global decorator:

// .bojagi/decorator.js
import React from 'react';
// Import your CSS here
import '../static/main.css';

const withDecorator = story => <>{story()}</>;

export default withDecorator;

Make sure you have a css and style loader in your webpack config. If you don't want to add it you can create a specific webpack config for Bojagi and reference it in the Bojagi configs.

← Quick StartSetup Bojagi With React and Storybook →
  • Can I use Bojagi with my existing Storybook stories?
  • My story crashes when using the react router Link component
  • My components are missing styling
Bojagi
HomepageWeb AppGitHubIssue Tracker
Copyright © 2021 Bojagi