twisty / formsy-react-components

Bootstrap components for a formsy-react form.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Only a ReactOwner can have refs" error when I use dev branch

brsbilgic opened this issue · comments

I try to test new HOCs in dev branch but it throws "Only a ReactOwner can have refs" error.

This is the code piece that I implemented.

import React from "react";
import {withRouter} from 'react-router';
import {Form} from "formsy-react";
import FRC from "formsy-react-components";


class MyFilter extends React.Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    handleFilterChange(data) {
        this.props.updateFilter(data);
    }

    render() {
        return (
            <Form onValidSubmit={this.handleFilterChange.bind(this)} formNoValidate>
                <FRC.Input name="employer" type="text" layout="vertical" value=""  label="Employer"/>
                <button className="btn btn-primary" type="submit">Submit</button>
            </Form>
        )
    }
}

I've read closed issues and there was a similar one. However, the recent release works very well.
This only happens in dev branch. Just to note that I use browserify. This is task

gulp.task('browserify-app', function () {
    console.log('Building JS...');
    return browserify('./src/js/app.js')
        .external(dependencies)
        .transform(babelify, {presets: ["es2015", "react"]})
        .transform(reactify)
        .transform(globify)
        .bundle()
        .on('error', function (e) {
            console.log(e.message);
            this.emit('end');
        })
        .pipe(source('bundle-app.js'))
        .pipe(buffer())
        .pipe(gulp.dest('./dist/js/'))
        .pipe(livereload());
});

Sorry @brsbilgic, haven't had chance to look into this, did you manage to fix?

I haven't encountered this (using webpack). What version of npm are you using? -- maybe try running npm prune and / or npm dedupe?

Will leave this open until August 10th. If no feedback by then will close. Thanks.