Property 'profileStore' is Missing in type '{}' but required in type 'Readonly<Appprops>'. ts

Asked

Viewed 321 times

0

I wanted to at least print the background red I put on footer.module.scss on index.tsx. I’m using this structure:

/components
/Footer
Footer.tsx
package.json
Footer.module.scss
types.ts

and is returning this bug here, at index.tsx:

Property 'lance' is missing in type '{}' but required in type 'IProps'.

The index.tsx:

import Footer from "./../components/footer"
import { IProps } from "./../components/footer/types"

function Batata() {
  return (
    <>
      {/* Configurações de head (helmet) */}
      <main>{<Footer></Footer>}</main>
    </>
  )
}

export default Batata

My Footer.tsx:

import React from "react"
import { IProps } from "./types"
import scss from "./Footer.module.scss"

function Footer(props: IProps) {
  return <section className={scss.container}>{props.lance}</section>
}

export default Footer

The package.json

{"main":"Footer.tsx"}

The types.ts:

  export interface IProps {
  lance: string
}
  • The right thing wouldn’t be <main><Footer lance='algo'></Footer></main>? You are calling the component without passing the props to it...

  • Thank you, that’s what I needed.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.