Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Source patching is not working #68

Closed
marcelaraujo opened this issue Mar 18, 2016 · 2 comments
Closed

Source patching is not working #68

marcelaraujo opened this issue Mar 18, 2016 · 2 comments

Comments

@marcelaraujo
Copy link

If you have this source

import React from 'react';

export default class Item extends React.Component {
    update(e) {
        console.warn(e.target.value);
    }

    test = (e) =>  {
        console.log("test", e.target.value);
    }

    render() {
        return <span>{this.props.name}<br/>
<input type="text" onChange={(e)=>this.update(e)} /><br/>
<input type="text" onChange={this.test} />
</span>;
    }
}

Any change you did on update method, the patch works but it doesn't on test method which uses arrow function.

@gaearon
Copy link
Owner

gaearon commented Apr 18, 2016

ES7 property syntax for functions is not currently supported for hot reloading.
You can track (or better, help implement!) this support in gaearon/react-hot-loader#242.
React Hot Loader 3 supersedes this project.

@gaearon gaearon closed this as completed Apr 18, 2016
@marcelaraujo
Copy link
Author

Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants