Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
React.rb is an Opal Ruby wrapper of React.js library.
It lets you write reactive UI components, with Ruby's elegance using the tried and true React.js engine. :heart:
Visit reactrb.org For The Full Story
react.rb
gem users please read this!Install the gem, or load the js library
gem 'reactive-ruby'
to your gem file orgem install reactive-ruby
orFor gem installation it is highly recommended to read the getting started section at reactrb.org
React.rb components are ruby classes that inherit from React::Component::Base
or include React::Component
.
React::Component
provides a complete DSL to generate html and event handlers, and has full set of class macros to define states, parameters, and lifecycle callbacks.
Each react component class has a render method that generates the markup for that component.
Each react component class defines a new tag-method in the DSL that works just like built-in html tags, so react components can render other react components.
As events occur, components update their state, which causes them to rerender, and perhaps pass new parameters to lower level components, thus causing them to rerender.
Under the hood the actual work is effeciently done by the React.js engine.
React.rb components are isomorphic meaning they can run on the server as well as the client. This means that the initial expansion of the component tree to markup is done server side, just like ERB, or HAML templates. Then the same code runs on the client and will respond to any events.
React.rb integrates well with Rails, Sinatra, and simple static sites, and can be added to existing web pages very easily, or it can be used to deliver complete websites.
react.rb
for specific problems.The original react.rb
gem is still available as the 0-3-stable branch. but please read on..
Many new features, bug fixes, and improvements are incoporated in the reactive-ruby
gem currently built on the 0-7-stable branch. In addtion more extensive documentation for the current stable branch is available at reactrb.org, and the Opal Ruby Playground incorporates the current stable branch.
Our plan is to do one more upgrade on the reactive-ruby
gem which will be designated version 0.8.0. click for detailed feature list
From 0.9.0 and beyond we will return to using the react.rb
gem for releases, and reactive-ruby
will continue as a meta gem that depends only on react.rb >= 0.9.x.
Version 0.9.0 of react.rb
will not be 100% backward compatible with 0.3.0 so its very important to begin your upgrade process now by switching to reactive-ruby
0.7.0.
Please let us know either at Gitter.im or via an issue if you have specific concerns with the upgrade from 0.3.0 to 0.9.0.
git clone
the project.
To play with some live examples cd to the project directory then
cd example/examples
bundle install
bundle exec rackup
http://localhos:9292
or
cd example/rails-tutorial
bundle install
bundle exec rails s
http://localhost:3000
or
cd example/sinatra-tutorial
bundle install
bundle exec rackup
http://localhost:9292
Note that these are very simple examples, for the purpose of showing how to configure the gem in various server environments. For more examples and information see reactrb.org.
bundle exec rake test_app
to generate a dummy test app.bundle exec rake
This project is still in early stage, so discussion, bug reports and PRs are really welcome :wink:.
In short, React.rb is available under the MIT license. See the LICENSE file for more info.
FAQs
Unknown package
We found that reactive-ruby demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.