Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add 2 class names react


...
    var liClasses = classNames({
      'main-class': true,
      'activeClass': self.state.focused === index
    });

    return (<li className={liClasses}>{data.name}</li>);
...

Source by coders911.org #
 
PREVIOUS NEXT
Tagged: #add #class #names #react
ADD COMMENT
Topic
Name
1+4 =