Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

116
Views
React Typescript interface

I get a problem when making an interface on Typescript!

export interface Content {
  uuid?: string;
  brand_id?: string;
  brand_name?: string;
  is_active?: boolean;
}

export interface Pageable {
  sort?: Sort;
  pageSize?: number;
  pageNumber?: number;
  offset?: number;
  unpaged?: boolean;
  paged?: boolean;
}

export interface Sort {
  sorted?: boolean;
  unsorted?: boolean;
  empty?: boolean;
}

export interface BrandData {
  content?: Content;
  pageable?: Pageable;
  numberOfElements?: number;
  number?: number;
  sort?: Sort;
  size?: number;
  first?: boolean;
  last?: boolean;
  empty?: boolean;
}
export interface BrandResponse {
  readonly data?: BrandData[];
}

and then i want to get data in react component like this

const { brands } = useSelector((state: AppState) => state.catalogs.brands);
const [brandData, setBrandData] = React.useState(brands.data);
const [currentPage, setCurrentPage] = React.useState(brandData.pageable.pageNumber);

then the error exits like this Property 'pageable' does not exist on type 'BrandData[]'.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!