With Rogue, the SSR configuration will be nearly invisible to you. You don't need a special
/pages directory (like Nextjs) or a separate
routes.js file (like Afterjs). Only the
App.js entry point you'd usually have. This means that you can wrap your app in layouts/transitions/providers, etc. the same way you would in a regular React Application, and staying true to React's values, you can organize your code however you like.
As an added benefit, Rogue also comes with first-class support for: Graghql (Apollo), State Mangagement (Redux), and Css-in-Js (Emotion / Styled-Components).
There are three Rogue packages:
@roguejs/app, holds the core modules for the Rogue framework. You can use this package to streamline your SSR experience independent of any build setup.
@roguejs/hocs, holds higher order components that come preconfigured with SSR support for Rogue. You can use this package to enhance your application without uncessary SSR boilerplate.
@roguejs/cli(WIP), holds the build and development system for the Roguejs framework. You can use this package to power a Roguejs app with zero configuration.
Each of the above packages holds its respective documentation inside its
Table of Contents
- Rogue Framework
- Rogue Hocs
How come you don't need any upfront route configuration anymore?
Since we assume you're using React Router 4 (why wouldn't you be?!), we can walk your component tree and use the same logic as your router to know which routes will be called so that we can handle SSR for them.
Read the docs on walking your
App.js tree for an in-depth explanation.
Will Rogue support static pages like
Rouge was created to make complex apps simpler. We leverage RR4 so that we can infer from your code what routes to dynamically SSR without any configuration. However, if you only need static pages, then Nextjs and Gatsby are great solutions, and having a
/pages directory might even fit your use-case better.
- Alid Castano (@alidcastano)