yarn add @kanzitelli/if-component
import {If} from '@kanzitelli/if-component';
class OrdersScreen = () => {
return (
<>
<If _={loading}
_then={<LoadingIndicator />}
_else={<SomethingElse />} />
</>
)
}
> git clone https://github.com/kanzitelli/if-component rn-lib
> cd rn-lib && rm -rf .git
> yarn
Don't forget to change your lib's name in package.json
and check other scripts.