Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 609 Bytes

README.md

File metadata and controls

35 lines (27 loc) · 609 Bytes

Install it

yarn add @kanzitelli/if-component

Use it

import {If} from '@kanzitelli/if-component';

class OrdersScreen = () => {
  return (
    <>
      <If _={loading}
      _then={<LoadingIndicator />}
      _else={<SomethingElse />} />
    </>
  )
}

TS lib starter

> 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.