Inline If is a programming method to make a condition in a line.
Use the package manager node.js to install inline-if.
npm install inline-if
or if you use yarn
yarn add inline-if
Usually js inline condition
render(){
return condition ? <Text>Condition if true</Text> : <Text>Condition if else</Text>
}
change it to
import iif from "inline-if"
render(){
iif(condition)(
<Text>Condition if true</Text>
)(
<Text>Condition if else</Text>
)
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.