Skip to content

Commit 6540570

Browse files
committed
Working.
1 parent 3df5ed9 commit 6540570

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
22

33
# Specify your gem's dependencies in react-rails-benchmark_renderer.gemspec
44
gemspec
5+
6+
gem "react-rails", github: "reactjs/react-rails"

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# React::Rails::BenchmarkRenderer
22

3-
This idea started with a PR I sent to actual react-rails before it hit 1.0 release. I didn't have time to finish it then,
4-
and the structure of the react-rails codebase changed considerably, so it is now quite easy to write a renderer as a plugin.
3+
This idea started with [a PR I sent](https://github.com/reactjs/react-rails/pull/101/files) to [actual react-rails](https://github.com/reactjs/react-rails) before it hit 1.0 release. I didn't have time to finish it then, and the structure of the react-rails codebase has changed considerably in latest master, so it is now
4+
quite easy to write a renderer as a plugin. Rewriting it as a modular plugin also allowed me to
5+
* Not be beholden to the Apache 2 license on react-rails
6+
* Not be beholden to the Facebook CLA
7+
* Own the code myself!
8+
* Kudos to Facebook for making react-rails more modular so I could easily write this plugin!
59

6-
This gem is a plugin to ract-rails providing two things:
10+
NOTE: This gem requires the unreleased master branch of react-rails. As such this gem may require some finesse.
11+
12+
This gem is a plugin to react-rails providing two things:
713

814
1. `React::ServerRendering::Concern::Instrumentation`
915
- benchmarking instrumentation of the sort found in rails view rendering

lib/react/rails/benchmark_renderer.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# Dependencies
12
require "active_support"
23
require "react-rails"
3-
require "react/server_rendering/exec_js_renderer"
4-
require "react/server_rendering/sprockets_renderer"
4+
5+
# This library
56
require "react/rails/benchmark_renderer/version"
67
require "react/server_rendering/concerns/instrumentation"
78
require "react/server_rendering/benchmark_renderer"

0 commit comments

Comments
 (0)