@tigre/isomorphic-style-loader-decorator
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@tigre/isomorphic-style-loader-decorator

A simple library that provides a React class decorator for use with isomorphic-style-loader. When using the style-loader you need to mark the styles as actually used so that they can be added to the document on both the client and server during SSR. Adding this decorator makes marking the styles used much easier when using class based React components.

Includes TypeScript .d.ts for use.

Installation

yarn add @tigre/isomorphic-style-loader-decorator

Usage

import React from "react";
import { withStyle } from "@tigre/isomorphic-style-loader-decorator";
import style from "./component.css";

@withStyle(style)
export class ThisComponent extends React.Component {
    render() {
        // Magic rendering...
        return null;
    }
}

License

Contact for licensing options.

Readme

Keywords

none

Package Sidebar

Install

npm i @tigre/isomorphic-style-loader-decorator

Weekly Downloads

0

Version

0.1.1

License

SEE LICENSE IN LICENSE

Unpacked Size

5.79 kB

Total Files

13

Last publish

Collaborators

  • tigre