cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.08k stars 399 forks source link

react-jss and default instance JSS not compatible #1312

Closed tomtom94 closed 4 years ago

tomtom94 commented 4 years ago

Hello,

The documentation says to do like this https://cssinjs.org/react-jss/?v=v10.1.1#custom-setup

import React from 'react'
import {create as createJss} from 'jss'
import {JssProvider} from 'react-jss'
import vendorPrefixer from 'jss-plugin-vendor-prefixer'

const jss = createJss()
jss.use(vendorPrefixer())

const App = () => null
const Component = () => (
  <JssProvider jss={jss}>
    <App />
  </JssProvider>
)

It doesn't work at all, (there is a bad typescript error at this level <JssProvider jss={jss}>

And if I use the default JSS instance inside react-jss

import {jss} from 'react-jss'

there is no error message, but jss-plugin-vendor-prefixer doesn't work at all.

(Then when I am on Internet Explorer 11, all the display: flex are fucked up, really bad)

kof commented 4 years ago

Please separate this issue in 2, one that seems to be a TS types prob, another one that you think is vendor-prefixer error, please provide a codesanbox example for the later.

tomtom94 commented 4 years ago

I don't have codesandbox you bother me all the time with that, your codesandbox is right here https://cssinjs.org/react-jss?v=v10.1.1#custom-setup

kof commented 4 years ago

No you bother me. Please don't use my software.