/js-interop

Evaluates a given expression and returns it. For example, it is very useful if you want to import a library but it is not yet available server-side (SSR).

Primary LanguageJavaScript

js-interop

Evaluates a given expression and returns it.

For example, it is very useful if you want to import a library but it is not yet available server-side (SSR).

npm npm npm bundle size JavaScript Style Guide

Install

npm i --save @honeybee-js/js-interop
yarn add @honeybee-js/js-interop

Usage

import { _interop } from 'js-interop'
/* Example NextJs */
import { _interop } from 'js-interop'
import styled from 'styled-components'

export const StyledComponent = _interop(styled).div`
  background: pink;
  color: black;
  ...
`

License

MIT © Samline