how to display react variable in render function using ternary operator

前端 未结 3 1265
你的背包
你的背包 2021-01-29 07:27

why doesn\'t \'hidden\' get added to the input tag?

class FontChooser extends React.Component {
  constructor(props) {
    super(props);
    this.state = { hidde         


        
3条回答
  •  温柔的废话
    2021-01-29 08:04

    You can use inline styles to hide

    
    

    Or you can use classes to hide

    
    

    If you just don't want to render it

    {!this.state.hidden &&
    
    }
    

提交回复
热议问题