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

react-jss

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jss - npm Package Compare versions

Comparing version 2.1.1 to 3.0.0

5

lib/index.js

@@ -140,5 +140,2 @@ 'use strict';

};
}
// Hotfix for babel 5 migration, will be removed in the next major version.
module.exports = exports = useSheet;
}

12

package.json
{
"name": "react-jss",
"version": "2.1.1",
"version": "3.0.0",
"description": "JSS mixin for React components",

@@ -13,3 +13,3 @@ "main": "lib/index.js",

"type": "git",
"url": "https://github.com/jsstyles/react-jss.git"
"url": "https://github.com/cssinjs/react-jss.git"
},

@@ -28,7 +28,7 @@ "keywords": [

"bugs": {
"url": "https://github.com/jsstyles/react-jss/issues"
"url": "https://github.com/cssinjs/react-jss/issues"
},
"homepage": "https://github.com/jsstyles/react-jss",
"homepage": "https://github.com/cssinjs/react-jss",
"peerDependencies": {
"jss": ">=1.0.0 < 5.0.0",
"jss": "5.2.0",
"react": ">=0.13"

@@ -50,3 +50,3 @@ },

"eslint-plugin-react": "^5.1.1",
"jss": "^3.11.1",
"jss": "^5.2.0",
"react": "^15.1.0",

@@ -53,0 +53,0 @@ "webpack": "^1.13.1"

@@ -0,4 +1,6 @@

[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/cssinjs/lobby)
## React JSS
The benefit of using react-jss instead of using [JSS](https://github.com/jsstyles/jss) directly is lazy evaluation and auto mount/unmount. It will compile your styles to CSS only when a component using them is mounted for the first time. Through ref counting, it will unmount styles when they are not in use by any of mounted component.
The benefit of using react-jss instead of using [JSS](https://github.com/cssinjs/jss) directly is lazy evaluation and auto mount/unmount. It will compile your styles to CSS only when a component using them is mounted for the first time. Through ref counting, it will unmount styles when they are not in use by any of mounted component.

@@ -9,5 +11,5 @@ You need this module if you build a big application where leaving all styles in the DOM or compiling all styles at once might have performance impact or you are going to hit [IE limits](http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/10164546.aspx).

You can use it as a [higher-order component](https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750) to inject [JSS](https://github.com/jsstyles/jss). It can act both as a simple wrapping function and as a [ES7 decorator](https://github.com/wycats/javascript-decorators).
You can use it as a [higher-order component](https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750) to inject [JSS](https://github.com/cssinjs/jss). It can act both as a simple wrapping function and as a [ES7 decorator](https://github.com/wycats/javascript-decorators).
React JSS wraps your React component and injects `this.props.sheet`, which is just a regular [JSS style sheet](https://github.com/jsstyles/jss), as a prop into your component. This is a common pattern that is used for composition in React instead of mixins, and works equally well with old-style `createClass` classes, as well as the ES6 classes.
React JSS wraps your React component and injects `this.props.sheet`, which is just a regular [JSS style sheet](https://github.com/cssinjs/jss), as a prop into your component. This is a common pattern that is used for composition in React instead of mixins, and works equally well with old-style `createClass` classes, as well as the ES6 classes.

@@ -14,0 +16,0 @@ Because JSS class names are namespaced by default, you will need to reach into `this.props.sheet.classes` to get their real names. For example, if you define a `button` class in your JSS stylesheet, its real name will be available as `this.props.sheet.classes.button`.

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