call function inside of className react.js

前端 未结 2 1356
小蘑菇
小蘑菇 2021-01-11 10:28

How do I call the function for getClass for the className inside this example? The way I have it written out does not seem to call getClass

2条回答
  •  别那么骄傲
    2021-01-11 10:55

    You're referencing the instance of the getClass() function as opposed to calling the function. Try tweaking it like so:

    render: function() {
        return(
            
    Example
    ); }

提交回复
热议问题