Skip to content

example app using react-rails, server side rendering, and code splitting using loadable-components

Notifications You must be signed in to change notification settings

Genius/react-rails-code-splitting-ssr-example

Repository files navigation

react-rails code splitting + server side rendering example

(more docs TK) the general idea here is that in order to code split and use SSR at the same time, we need to take advantage of webpack's multi-compiler mode, which webpacker doesn't support out of the box

Setup

rails new --webpack=react --skip-turbolinks app
bundle add react-rails
bundle exec rails generate react:install
yarn add @loadable/component @loadable/server
yarn add -D @loadable/babel-plugin @loadable/webpack-plugin

run ./bin/webpack at least once before running bundle exec rails s

How it works

About

example app using react-rails, server side rendering, and code splitting using loadable-components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published