Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: filters.map is not a function #2

Open
Shamal-Shine opened this issue Jan 22, 2022 · 1 comment
Open

TypeError: filters.map is not a function #2

Shamal-Shine opened this issue Jan 22, 2022 · 1 comment

Comments

@Shamal-Shine
Copy link

please help me to solve this error

@Josh-millr
Copy link

Josh-millr commented Feb 21, 2022

It means "filters" is not an array, i believe this error is coming from the SearchFilters component
Make sure you have the filterData.js file, and you're properly importing it

import { filterData } from "../utils/filterData";

Next, make sure you've properly setup state
const [filters] = useState(filterData);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants