V
V
Vovash2020-07-24 18:26:04
React
Vovash, 2020-07-24 18:26:04

How to pass all parameters?

I receive a bunch of parameters, I want to pass all of it further to the components, how to implement it correctly?
how to wrap the result of getting these parameters?

const {
        getTableProps,
        getTableBodyProps,
        headerGroups,
        prepareRow,
        page,
        canPreviousPage,
        canNextPage,
        pageOptions,
        pageCount,
        gotoPage,
        nextPage,
        previousPage,
        setPageSize,
        state: { pageIndex, pageSize },
      } = useTable(
        {
          columns,
          data,
          initialState: { pageIndex: 0 },
        },
        useSortBy,
        usePagination
      )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Loli E1ON, 2020-07-24
@V0vash

const table = useTable({
          columns,
          data,
          initialState: { pageIndex: 0 },
        },
        useSortBy,
        usePagination
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question