Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

conditional jsx property

render() {
  return (
    <a className="navbar-brand" {... url ? {href: url} : {}}>Logo</a>
  )
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #conditional #jsx #property
ADD COMMENT
Topic
Name
5+1 =