skip to Main Content

Brackets in JavaScript/React in Query Params

How do I achieve the brackets as shown in this URL? {{url}}/invoices?orderBy[created_at]=asc&orderBy[reference_number]=asc invoiceApi.js import api from '@/api/api'; import { useMutation, useQuery } from '@tanstack/react-query'; const invoiceUrl = `/invoices`; export const fetchInvoices = ( { pageNumber, pageSize, search = '', orderBy…

VIEW QUESTION
Back To Top
Search