stenciljs/eslint-plugin

How to resolve "react/jsx-no-bind" in Stencil context.

Open

#11 建立於 2020年5月10日

在 GitHub 查看
 (3 留言) (2 反應) (0 負責人)TypeScript (37 fork)auto 404
Help Wantedtriage

倉庫指標

Star
 (71 star)
PR 合併指標
 (PR 指標待抓取)

描述

As per the recommendations on the stencil docs I use the binding/arrow function quite often on elements. What would be the best way to resolve the "react/jsx-no-bind" rule. I have seen their documentation but I can't seem to understand how the solutions could be applied in the context of Stencil components. This rule has been added intentionally to the stencil rules so I assume there is a solution to this, I just can't find it.

let item = "value";
<div onClick={() => self.select(item)}</div>

warning JSX props should not use arrow functions react/jsx-no-bind

貢獻者指南