Comments (6)
I also agree with refactoring.
Do we need to save the data in SessionStorage?
or we can remove the Context completely and use the SearchParams hook in components?
replace
const { operatorId, lineNumber, timestamp, routes, routeKey } = search```
with
const [operatorId,setOperatorId] = useSearchParams('')
const [lineNumber,setLineNumber] = useSearchParams('')
const [routes,setRoutes] = useSearchParams('')
const [routeKey,setRouteKey ] = useSearchParams('')
const [timestamp,setTimestamp] = useSearchParams(moment().valueOf())
from open-bus-map-search.
@ArkadiK94 @aviv1620
I support both suggestions.
Having the search parameters stored in the local storage will allow us to retrieve the latest search for the user. It's very likely that our users will want to search the same line over and over.
However, it complicates things, and I prefer simplicity when maintaining such a project.
Feel free to make it comfortable - your help is very appreciated
from open-bus-map-search.
I think we need merge this issue with issue #83 and issue #71.
The problems come from the same place on the code.
from open-bus-map-search.
what do you think about redux?
from open-bus-map-search.
@giladfuchs
We store the data on URL params.
So I think that the useSearchParams have some logic that similar to state management.
from open-bus-map-search.
@giladfuchs overcomplicated for our needs.
IMO, using react context will be better fit for our needs.
from open-bus-map-search.
Related Issues (20)
- Operator profile page HOT 2
- Fix a Playwright test HOT 2
- can we send MOT (משרד התחבורה) complaint using POST request? HOT 1
- חיפוש נסיעות לפי מספר לוחית רישוי HOT 6
- Can't put 17א where I'm advised to put 17א HOT 1
- Change of dates make line data disappear HOT 9
- Add a map to the line profile page
- Visualize data about a bus-line HOT 13
- We don't always see the planned route - why? HOT 8
- Wrong line profile information HOT 1
- Dark mode hides map legends HOT 3
- add youtube videos HOT 6
- no scrolling on live map preview HOT 10
- היסטוריית נסיעות לא עובדת HOT 4
- Embed youtube playlist to our about page HOT 3
- Change the title of the "realtime" page HOT 3
- Make the language button visible and visually pleasant HOT 6
- Redesign Proposal HOT 7
- Dashboard data isn't cached
- center map automatically HOT 2
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 open-bus-map-search.