How do I define methods in stateless components?

前端 未结 5 451
离开以前
离开以前 2020-12-16 10:04

If I simply have:

const App = function() {
    return (
        
{this.renderList()}
) }

How do I define the

5条回答
  •  醉话见心
    2020-12-16 10:33

    You can create render list function as standalone and use function parameter to pass props into function.

提交回复
热议问题