Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-rails-ujs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-rails-ujs - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

.editorconfig

12

dist/react-rails-ujs.js

@@ -20,3 +20,7 @@ 'use strict';

'NAME_ATTR': 'data-react-class',
'PROPS_ATTR': 'data-react-props'
'PROPS_ATTR': 'data-react-props',
render: function render(component, props) {
return _react2.default.createElement(component, props);
},
strict: true
};

@@ -42,7 +46,9 @@

}
throw new Error('[react-rails-ujs] ' + message);
if (config.strict) {
throw new Error('[react-rails-ujs] ' + message);
}
} else {
_reactDom2.default.render(_react2.default.createElement(component, props), node);
_reactDom2.default.render(config.render(component, props), node);
}
}
}
{
"name": "react-rails-ujs",
"version": "1.0.0",
"version": "1.1.0",
"description": "mounting components built with webpack (compatible with react-rails)",

@@ -5,0 +5,0 @@ "keywords": [

@@ -33,3 +33,3 @@ # react-rails-ujs

import { mountComponents } from './react-rails-ujs';
import { mountComponents } from 'react-rails-ujs';

@@ -41,1 +41,36 @@ import { Message } from './components/Message';

});
## Usage with React Hot Reload
import React from 'react';
import { AppContainer } from 'react-hot-loader';
import { mountComponents } from 'react-rails-ujs';
import { Message } from './components/Message';
const render = (component, props) => (
<AppContainer><component {...props}/></AppContainer>
);
mountComponents({
Message,
}, module.hot ? { render } : {});
## Usage with Redux
import React from 'react';
import { Provider } from 'react-redux'
import { mountComponents } from 'react-rails-ujs';
import createStore from './store/createStore';
import { Message } from './components/Message';
const store = createStore();
const render = (component, props) => (
<Provider store={store}><component {...props}/></Provider>
);
mountComponents({
Message,
}, { render });

@@ -7,2 +7,4 @@ import React from 'react';

'PROPS_ATTR': 'data-react-props',
render: (component, props) => React.createElement(component, props),
strict: true,
};

@@ -26,7 +28,9 @@

}
throw new Error(`[react-rails-ujs] ${message}`);
if (config.strict) {
throw new Error(`[react-rails-ujs] ${message}`);
}
} else {
ReactDOM.render(React.createElement(component, props), node);
ReactDOM.render(config.render(component, props), node);
}
}
}
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