Skip to content

Instantly share code, notes, and snippets.

@Ateevduggal
Created June 11, 2022 03:52
Show Gist options
  • Save Ateevduggal/557e685806ddc91e9a7f64cb57b017c4 to your computer and use it in GitHub Desktop.
Save Ateevduggal/557e685806ddc91e9a7f64cb57b017c4 to your computer and use it in GitHub Desktop.
// input data for table
const [tableData, setTableData] = useState(data);
//for data ids
const [toggle, setToggle] = useState(null);
//for filtering data
const [search, setSearch] = useState("");
// for editing data
const [editData, setEditData] = useState({
fullName: "",
userName: "",
address: "",
phoneNumber: "",
email: "",
website: "",
companyName: "",
});
//for sorting
const [order, setOrder] = useState("asc");
// for pagination
// No of pages
const [number, setNumber] = useState(1);
//Number of Posts per page
const [postPerPage] = useState(4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment