🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

react-switch_case

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-switch_case

react switch

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

react-switchCase

  • npm install react-switch_case or yarn add react-switch_case
 import Switch from 'react-switch_case'
 const Case=Switch.Case
 function handle(value){
    return ['3','4','5'].includes(value)
 }
 <Switch value="1">
     <Case value="1" style={{color:'red'}}>aaa</Case>
     <Case value="2">aaa</Case>
     {
        //value can be a function
     }
     <Case value={handle}>aaa</Case>
     {
        //default
     }
     <span>default case</span>
 </Switch>

Keywords

react

FAQs

Package last updated on 24 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts