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

styled-jsx

Package Overview
Dependencies
Maintainers
3
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styled-jsx - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

server.js

2

package.json
{
"name": "styled-jsx",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "zeit/styled-jsx",

@@ -198,25 +198,9 @@ # styled-jsx

### `styled-jsx/flush`
### Advanced APIs
In the server rendering pipeline, you can obtain the entire CSS of all components by invoking `flush`:
Low level APIs are also available:
```js
import flush from 'styled-jsx/flush'
- `styled-jsx/flush`: exports a method that returns the existing memory (see below) and resets it
- `styled-jsx/memory`: exports the `Object` holding the references to used styles. DOM on the client, strings on server
// …
// <render here>
// …
const styles = flush()
for (let id in styles) {
const css = styles[id]
console.log(id, css)
}
```
This API is also available on the client: Instead of returning the CSS text, it returns a reference to the automatically generated `<style>` tag.
This is useful for performing diffs of elements between top-level `render()` calls, and ditching style elements that are no longer being used.
## Credits

@@ -223,0 +207,0 @@

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