Skip to content

can't get it to work - minimal example code might help #8

Closed
@barbalex

Description

@barbalex

to me it is not clear, what is needed for a minimal implementation. In the provided example I don't understand which parts are needed and which might just be exemplary:

<Resizable className="via transferPropsTo" onResize={this.onResize}>
 Content...
</Resizable>

is

className="via transferPropsTo"

really needed? I would guess not.

Is

onResize={this.onResize}

really needed? I would get yes but I get the following error with or without: "Uncaught TypeError: this.props.onResize is not a function"

Here is what I did:

1 import the component:

import Resizable from 'react-component-resizable'

2 Include it's dom-function in a React render:

<Resizable style={{width: 100 + 'px', height: 100 + 'px', backgroundColor: 'green'}}/>

or:

<Resizable  onResize={this.onResize} style={{width: 100 + 'px', height: 100 + 'px', backgroundColor: 'green'}}/>

Metadata

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