atom-react icon indicating copy to clipboard operation
atom-react copied to clipboard

Autocomplete for 'props' adds a second 'this.'

Open ViggoV opened this issue 8 years ago • 3 comments

It is very annoying that every time I try to write this.props, the autocomplete adds an additional 'this.' to my statement, resulting in 'this.this.props' so I have to go back and edit it.

ViggoV avatar Nov 22 '16 08:11 ViggoV

hey you can edit the snippet file in .atom/packages/react/snippets/JavaScript (JSX).cson or add your custom cson file, in your case you could just edit that file to remove the props autocomplete or add another shortcut for it.

Or you could just type props n enter to get this.props.

akparhi avatar Nov 23 '16 09:11 akparhi

Thank you very much :)

Den 23. nov. 2016 kl. 10.08 skrev Anand Kumar Parhi [email protected]:

hey you can edit the snippet file in .atom/packages/react/snippets/JavaScript (JSX).cson or add your custom cson file, in your case you could just edit that file to remove the props autocomplete or add another shortcut for it.

Or you could just type props n enter to get this.props.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/orktes/atom-react/issues/214#issuecomment-262463055, or mute the thread https://github.com/notifications/unsubscribe-auth/ADAeoJPLEXWF182NTDGJwuSiCTtVL6eMks5rBAKLgaJpZM4K5IQb.

ViggoV avatar Nov 23 '16 09:11 ViggoV

This is causing a problem for me as well. Since props is a very common term in react and there are many places you do not want this in front of props, could the snippet to do this.props. be changed to something else?

RyanMitchellWilson avatar Mar 13 '17 19:03 RyanMitchellWilson