2.0.7 • Published 1 year ago

react-switch-case-module v2.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

React Switch Case Module

Switch component to easy make conditional rendering

First install the package:

npm install react-switch-case-module

And import the module:

import { Switch, Case } from 'react-switch-case-module';

Then you can use it:

<Switch 
    componentName={'HelloComponent'} 
    defaultComponent={<div>Default component</div>}
>
    <Case value={'HelloComponent'}><div>Hello</div></Case>
    <Case value={'ByeComponent'}><div>Bye</div></Case>
</Switch>
2.0.3

1 year ago

2.0.2

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago