react-jss
Advanced tools
Comparing version 2.1.1 to 3.0.0
@@ -140,5 +140,2 @@ 'use strict'; | ||
}; | ||
} | ||
// Hotfix for babel 5 migration, will be removed in the next major version. | ||
module.exports = exports = useSheet; | ||
} |
{ | ||
"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`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
241
13877
107