@britannica/cra-template

1.3.0 • Public • Published

@britannica/cra-template

Britannica's create-react-app template

Usage

$ npx create-react-app --template @britannica/cra-template

In the box

  • Built with Reactstrap
  • React Router w/ routing utility methods
    // When defining routes
    <Route path={Routes.POST.path} /> // <Route path="/post/:id" />
    
    // When building links
    <Link to={Routes.POST.toLink({ id: 123 })} /> // <Link to="/post/123" />
  • Create resusable layouts using Templates
    // In our example, DefaultTemplate contains our Header and Footer, which will automatically be included
    const MyPage = () => (
      <DefaultTemplate>
        <Container>
          <h1>My Page</h1>
          {/* ...the rest of the page */}
        </Container>
      </DefaultTemplate>
    );
  • Automatic linting on commit

To-do

  • [ ] Add Storybook configuration
  • [ ] Add stories for components
  • [ ] Add tests for components
  • [ ] Add generate-react-cli.json configuration
  • [ ] Remove <Fragment /> from *.lazy.js files

Package Sidebar

Install

npm i @britannica/cra-template

Weekly Downloads

3

Version

1.3.0

License

MIT

Unpacked Size

79.6 kB

Total Files

35

Last publish

Collaborators

  • britannicabot
  • ryanwalters
  • jsmykil
  • arminbro
  • schembri