export const usePagination = ({
totalCount,
pageSize,
siblingCount = 1,
currentPage
}) => {
const paginationRange = useMemo(() => {
const totalPageCount = Math.ceil(totalCount / pageSize);
import React, { useState } from 'react';
import {Form, Row, Col, Input, Button, Switch, } from 'antd'
const { TextArea } = Input;
const DynamicCheckbox = () => {
// States
const [form] = Form.useForm()
const [selectedBox, setSelectedBox] = useState(null)
const PaymentInfo = Form.useWatch('payment_information', form);
-
TypeScript is a superset of JavaScript. But it doesnot add more feature in JavaScript. It just allow us to write JavaScript as a precise manner so that code get less error at runtime.
-
TypeScript is all about type safety
-
TypeScript only job is
Static Checking
which means it checks type on runtime and shows error while we are writing code -
TypeScript transpile code into JavaScript