Comments (3)
They can get out of sync if they aren't managed properly
Can you think of an example? As far as I can tell, as long as the variables in the components are observing the state in the store, and not using any other source of information, it's just convenience, and not really a problem.
I checked the ngrx example project, to see how they handle it, and they also seem to use these local observables. e.g. https://github.com/ngrx/example-app/blob/master/src/app/containers/find-book-page.ts#L21
from dspace-angular.
I don't think the observable will get out of sync. I'm just concerned someone might inadvertently reassign the field variable and get unexpected results then. This should be unlikely, as the way to update the state of the app is not by reassigning variables. If possible I'd make the fields final/constant, but converting them to functions would also eliminate the problem.
I guess it's a choice of style. Unless there's a difference in reusing rxjs observables as opposed to getting a new one from the store everytime. (probably not)
from dspace-angular.
I agree it's a good idea to stick with the same style as the ngrx example project.
from dspace-angular.
Related Issues (20)
- Encoded `RequestParam` values increase the number of "self link...don't match" logs HOT 2
- Generate the full text link of harvested items if using "Harvest Metadata with references to bitstreams"
- Error preventing submitter to deposit a new item in DSpace 7 HOT 10
- The "Register DOI" button on the Item status page is not displayed HOT 1
- Cancelling after giving focus to Processes select dropdown, but not selecting a script, incorrectly generates an error HOT 3
- Cannot Delete an Entity which has Relationships HOT 2
- Combine adjacent image and text links for the same resource HOT 1
- Headings must have an appropriate relative hierarchy to other headings on the same page. HOT 1
- Versioning an Entity can throw an "Index 0 out of bounds for length 0" exception HOT 1
- Accessibility Issue: keyboard-only users cannot interact with "show more" HOT 4
- [Accessibility] Combine Adjacent Links
- [Accessibility] Avoid repetition of identical link text on same page
- Missing focus indicators HOT 1
- "All of DSpace" menu in nav bar remains open and obscures site visibility when navigating by keyboard only HOT 3
- Delete and Send back buttons on Workflow items perform the same action in Administer workflow section HOT 1
- Warn users before executing an automatic change of context HOT 1
- Integration of Google reCAPTCHA into DSpace Feedback Form HOT 1
- (Discussion) High CPU usage in DSpace frontend related to Angular Server Side Rendering (SSR) HOT 12
- Rendering markdown before mathjax can lead to wrong outcome HOT 1
- Remove Bitstreams on edit-item-page doesn't work HOT 5
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 dspace-angular.