How to use the styletron-react.DebugEngine function in styletron-react

To help you get started, we’ve selected a few styletron-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / styletron-react / styletron-react-tests.tsx View on Github external
renderKeyframes: engineNoop,
    renderFontFace: engineNoop,
};

const App = () => (
    
        
    
);

;

// 
// --------------------------

const debug = new DebugEngine();

const DevApp = () => (
    
        
    
);

;

// useStyletron()
// --------------------------

const [css] = useStyletron();

<div>;
</div>
github proksh / atomize / docs / App.js View on Github external
import React, { Component } from "react";
import { Provider as StyletronProvider, DebugEngine } from "styletron-react";
import { Client as Styletron } from "styletron-engine-atomic";

const debug =
  process.env.NODE_ENV === "production" ? void 0 : new DebugEngine();

// 1. Create a client engine instance
const engine = new Styletron();

import {
  Div,
  StyleReset,
  ThemeProvider,
  Container,
  Icon,
  Button,
  Row,
  Col,
  Input,
  Text,
  Textarea,
github uber / baseweb / documentation-site / helpers / styletron.js View on Github external
/* global document */

import {Client, Server} from 'styletron-engine-atomic';
import {DebugEngine} from 'styletron-react';

export const isServer = typeof window === 'undefined';

const getHydrate = () => document.getElementsByClassName('_styletron_hydrate_');

export const styletron = isServer
  ? new Server()
  : new Client({hydrate: getHydrate()});

export const debug =
  /*eslint-disable*/
  process.env.NODE_ENV === 'production' ? void 0 : new DebugEngine();
github zeit / next.js / examples / with-styletron / styletron.js View on Github external
import { Client, Server } from 'styletron-engine-atomic'
import { DebugEngine } from 'styletron-react'

const getHydrateClass = () =>
  document.getElementsByClassName('_styletron_hydrate_')

export const styletron =
  typeof window === 'undefined'
    ? new Server()
    : new Client({
        hydrate: getHydrateClass(),
      })

export const debug =
  process.env.NODE_ENV === 'production' ? void 0 : new DebugEngine()
github fusionjs / fusionjs / fusion-plugin-styletron-react / src / browser.js View on Github external
worker.postMessage({
            id: 'init_wasm',
            url: wasmRoute,
          });
          worker.postMessage({
            id: 'set_render_interval',
            interval: 180,
          });
          if ((module: any).hot) {
            (module: any).hot.addStatusHandler(status =&gt; {
              if (status === 'dispose') {
                worker.postMessage({id: 'invalidate'});
              }
            });
          }
          debugEngine = new DebugEngine(worker);
        }
        ctx.element = (
          
            {ctx.element}
          
        );
      }

      return next();
    },
  });

styletron-react

React bindings for Styletron

MIT
Latest version published 10 months ago

Package Health Score

72 / 100
Full package analysis

Similar packages