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)
- בעיה במצב כהה HOT 3
- בעיה בטופס דיווח באגים HOT 8
- history tab says "line not found" when I finish selecting all fields HOT 3
- Pattern tab - shows wrong data HOT 4
- User wants to view "patterns of missed trips" HOT 4
- The "donations" tab in sidebar needs to open a pop up. Same as the icon in header
- ci: deploy a preview of the test report after every PR update HOT 3
- test: add visual tests for dark mode
- Apply code review comments HOT 5
- fix: DateSelector selector validation message issues
- changing the date in the gaps page doesn't refresh all of the data
- Show אינדיקציית החרגה informaion
- דרך אגד HOT 1
- test | block google analytics when running tests
- History tab - nothing happens when I finish selecting all fields
- user complaints - scrolling the map and the report page HOT 1
- צדשחהחיב
- מפה לפי קו
- card elements is hardy visible at dark mode HOT 1
- לא נטען היסטורית נסיעות
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.