Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.

Does not work with react 15.1.0 #1

Closed
@pke

Description

Thanks for this nice stylesheet less version :)
It worked great until I upgraded to react 15.1.0

Now it throws:

image

Edit

The problem is actually with react 15. They introduced some __DEV__ only code, that does not check if the CSSPropertyOperations.setValueForStyles actually gets the 3rd component arg.

setValueForStyles: function(node, styles, component) {
    if (__DEV__) {
      ReactInstrumentation.debugTool.onHostOperation(
        component._debugID,
        'update styles',
        styles
      );
    }

I could fix it (for now) like this:

const REACT15_COMPONENT_HACK = { _debugID: 666, _currentElement: {} }

CSSPropertyOperations.setValueForStyles(node, transitionStyles, REACT15_COMPONENT_HACK)

I mentioned it over there facebook/react#6754 (comment)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions