Closed
Description
Hi, i have the following file which does not have a stateless functional component, it does not involve react at all but is showing me the error react/no-this-in-sfc
when i call this.connection
.
import { ValidatedMethod } from "meteor/mdg:validated-method";
import { SimpleSchema } from "meteor/aldeed:simple-schema";
export const prepareLogin = new ValidatedMethod({
name: "user.prepare",
validate: new SimpleSchema({
// ...
}).validator(),
run({ remember }) {
if (Meteor.isServer) {
const connectionId = this.connection.id; // react/no-this-in-sfc
return Methods.prepareLogin(connectionId, remember);
}
return null;
},
});