New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react_ujs

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react_ujs - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

18

CHANGELOG.md

@@ -11,2 +11,18 @@ # react-rails

## 2.4.0
#### Breaking Changes
- (Sprockets) Prebundled React upgraded to 16 #792
- (Sprockets) Addons removed # 792
#### New Features
#### Deprecation
#### Bug Fixes
- Coffeescript generator exports correctly #799, #800
- Running detector manually no longer breaks if Turbolinks is not preset #802
## 2.3.1

@@ -16,3 +32,3 @@

- React Deprecations for 15.4, 15.5, 15.6 in preparation for 16 handled in prebundled version
- React Deprecations for 15.4, 15.5, 15.6 in preparation for 16 handled in prebundled version #789, #798

@@ -19,0 +35,0 @@ #### New Features

2

package.json
{
"name": "react_ujs",
"version": "2.3.1",
"version": "2.4.0",
"description": "Rails UJS for the react-rails gem",

@@ -5,0 +5,0 @@ "main": "react_ujs/index.js",

@@ -9,3 +9,3 @@ # react-rails

You are looking at the 2.3 stable branch. This branch is for maintaining the prebundled 15.6 ReactJS with Addons. Gem version 2.4.x onwards and master will no longer have React Addons.
Gem version 2.4.x onwards and master will no longer have React Addons.

@@ -20,3 +20,3 @@ If you need to make changes for the prebundled react, see the migration docs here:

- React's [Getting Started guide](https://facebook.github.io/react/docs/getting-started.html)
- Use React & JSX [with webpacker](#use-with-webpacker) or [with the asset pipeline](#use-with-asset-pipeline)
- Use React & JSX [with Webpacker](#use-with-webpacker) or [with the asset pipeline](#use-with-asset-pipeline)
- Rendering [components in views](#view-helper) or [in controller actions](#controller-actions)

@@ -46,3 +46,3 @@ - [Server-side rendering](#server-side-rendering)

[webpacker](https://github.com/rails/webpacker) integrates modern JS tooling with Rails. `ReactRailsUJS` allows you to gradually migrate to webpacker.
[Webpacker](https://github.com/rails/webpacker) integrates modern JS tooling with Rails. `ReactRailsUJS` allows you to gradually migrate to Webpacker.

@@ -59,7 +59,7 @@ Get started by adding `webpacker` to your gemfile and installing `webpacker` and `react-rails`:

- `components/` directory for your React components
- [`ReactRailsUJS`](#ujs) setup in `packs/application.js`
- `packs/server_rendering.js` for [server-side rendering](#server-side-rendering)
- `app/javascript/components/` directory for your React components
- [`ReactRailsUJS`](#ujs) setup in `app/javascript/packs/application.js`
- `app/javascript/packs/server_rendering.js` for [server-side rendering](#server-side-rendering)
When you add a component to `components/`, you can [render it in a Rails view](#view-helper):
When you add a component to `app/javascript/components/`, you can [render it in a Rails view](#view-helper):

@@ -92,2 +92,12 @@ ```erb

### Gotcha: Capitalization
Component File Name | `react_component` call
-----|-----
`app/javascript/components/samplecomponent.js` | `react_component("samplecomponent")`
`app/javascript/components/sample_component.js` | `react_component("sample_component")`
`app/javascript/components/SampleComponent.js` | `react_component("SampleComponent")`
`app/javascript/components/SampleComponent.js.jsx` | Has to be renamed to SampleComponent.jsx, then use `react_component("SampleComponent")`
## Use with Asset Pipeline

@@ -265,3 +275,3 @@

- On the asset pipeline, it looks up `className` in the global namespace.
- On webpacker, it `require`s files and accesses named exports, as described in [Use with Webpacker](#use-with-webpacker).
- On Webpacker, it `require`s files and accesses named exports, as described in [Use with Webpacker](#use-with-webpacker).

@@ -268,0 +278,0 @@ You can override this function to customize the mapping of name-to-constructor. [Server-side rendering](#server-side-rendering) also uses this function.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc