Module: ReactOnRailsPro::AsyncRendering

Extended by:
ActiveSupport::Concern
Defined in:
lib/react_on_rails_pro/concerns/async_rendering.rb

Overview

AsyncRendering enables concurrent rendering of multiple React components. When enabled, async_react_component calls will execute their HTTP requests in parallel instead of sequentially.

Examples:

Enable for all actions

class ProductsController < ApplicationController
  include ReactOnRailsPro::AsyncRendering
  enable_async_react_rendering
end

Enable for specific actions only

class ProductsController < ApplicationController
  include ReactOnRailsPro::AsyncRendering
  enable_async_react_rendering only: [:show, :index]
end

Enable for all except specific actions

class ProductsController < ApplicationController
  include ReactOnRailsPro::AsyncRendering
  enable_async_react_rendering except: [:create, :update]
end