This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const numInt = "10" | |
const convertedInt = +numInt | |
// 10 | |
const numFloat = "10.51" | |
const convertedFloat = +numFloat | |
// 10.51 | |
const notANumber = "chicken" | |
const convertedNaN = +notANumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const numInt = "10" | |
const convertedInt = parseFloat(numInt) | |
// 10 | |
const numFloat = "10.51" | |
const convertedFloat = parseFloat(numFloat) | |
// 10.51 | |
const notANumber = "chicken" | |
const convertedNaN = parseFloat(notANumber) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const numInt = "10" | |
const convertedInt = parseInt(numInt) | |
// 10 | |
const numFloat = "10.51" | |
const convertedFloat = parseInt(numFloat, 10) | |
// 10 | |
const notANumber = "chicken" | |
const convertedNaN = parseInt(notANumber) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const numInt = "10" | |
const primitiveInt = Number(numInt) | |
// 10 | |
const numFloat = "10.51" | |
const primitiveFloat = Number(numFloat) | |
// 10.51 | |
const notANumber = "chicken" | |
const primitiveNaN = Number(notANumber) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from "styled-components"; | |
interface ILoading { | |
loading: boolean; | |
} | |
interface IProps extends ILoading { | |
data: any; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from "styled-components"; | |
interface ILoading { | |
loading: boolean | |
} | |
const Loader = styled.div<ILoading>` | |
display: ${(props) => (props.loading ? "block" : "none")}; | |
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from "styled-components"; | |
const Loader = styled.div` | |
display: ${(props) => (props.loading ? "block" : "none")}; | |
`; | |
export const Loader = (props) => { | |
const { loading } = props; | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface UserBase { | |
username: string | |
email: string | |
status: string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface SliceBase { | |
loading: boolean | |
error: boolean | |
errorMessage: string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ModalBase { | |
open: boolean | |
setOpen(open: boolean): void | |
} |
NewerOlder