oz-branch-free
Library with alternatives to hard coded switch-case and if-else blocks
Library with alternatives to hard coded switch-case and if-else blocks
React helper conditional components for convenient and declarative development
A conditional rendering package for React and React Native
Syntactic sugar for if, else statements by a function. Aim for an implementation both clean and elegant.
An improved switch syntax for javascript, which allows you to cover more base - such as using comparative statements inside switch cases.
Render components conditionally for react
`choose-when` 是一个轻量级的 `React` 组件包,用于在 `React` 应用程序中实现条件渲染, 替代三元表达式的嵌套。通过简单的 `Choose`, `When`, 和 `Otherwise` 组件,可以方便地根据不同的条件来渲染对应的内容,主要是为了提升代码可读性和可维护性。
[](https://www.npmjs.com/package/conditional-render-simplify)
Control flow as an expressions for JavaScript
If as an expression for JavaScript
If a condition is truthy, return `x`; otherwise, return `y`.
If a condition is truthy, invoke `x`; otherwise, invoke `y`.
If a predicate function returns a truthy value, invoke `x`; otherwise, invoke `y`.
If a predicate function returns a truthy value, return `x`; otherwise, return `y`.