Comments (12)
I'll work on this.
from airbnb-clone.
Great - assigning to you
from airbnb-clone.
I have almost created the component but stuck on some errors . Should I update the code for everybody to view?
from airbnb-clone.
What are the errors you found? If you can get it to a place where there are no breaking changes, we can create a new issue to fix the errors you have. Right now, I'm getting an "object is not iterable erro" on AppSearchBar
from airbnb-clone.
Is this issue fixed... ? Facing same error
from airbnb-clone.
yeah, this is the error I am facing too... I am checking several resources but have not been able to figure out a solution. I guess we can create a new issue for this. In the meanwhile, I'll try myself also for correcting the same. And after this issue gets fixed, We can focus on building more components.
from airbnb-clone.
Take reference from this
- First update DataContext
export const initialState: IInitialState = { location: '', checkIn: null, checkOut: null, guests: { adults: 0, children: 0, infants: 0 }, };
export const DataContext = createContext<{ state: IInitialState; dispatch: React.Dispatch<any>; }>({ state: initialState, dispatch: () => null, });
interface IIProps { children: React.ReactNode; }
export const ContextProvider = ({ children }: any) => { const [state, dispatch] = useReducer(dataReducer, initialState); return ( <> <DataContext.Provider value={{ state, dispatch }}> {children} </DataContext.Provider> </> ); };
-
While using your context in Date range Destruture like this
const { state, dispatch } = useDataContext();
const { location, checkIn, checkOut, guests } = state;
-
Also add ContextProvider to parent component so that dispatch can work
-
Avoid using any
-
You might also need to add some null checks on you component while using state
This worked for me
from airbnb-clone.
I am facing a few errors which I am unable to resolve. I'll work on it, if I get it, I'll make a PR.
from airbnb-clone.
I'd like to work on it. Please assign it to me.
from airbnb-clone.
Assigning it to you
from airbnb-clone.
I've a question, what does Vivid in "Sticky Nav by using Vivid" means??
from airbnb-clone.
I ran the code in my local environment, Theres just a simple navbar in it? what to do, ? I am quite confused
from airbnb-clone.
Related Issues (20)
- Tailwind configuration HOT 4
- Listing page - Amenities HOT 3
- Listing page - Date picker HOT 8
- Listing page - Reviews section HOT 4
- Add CODE_OF_CONDUCT.md
- Add CODE_OF_CONDUCT.md
- App won't compile because of error useContext HOT 2
- Add .prettierrc and .editorconfig & typedoc
- Broken link
- aryamankha/airbnb-clone
- Home Page HOT 3
- Add Dockerfile for local development.
- Home - Individual Listing Component HOT 2
- Home - Listing Grid HOT 4
- Home - Filters modal HOT 2
- Listing page - top bar HOT 4
- Listing page - Gallery HOT 1
- Listing page - pricing component HOT 3
- Listing page - description HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airbnb-clone.