Comments (4)
+1 here
from redux-object.
This is a basic redux question. You are supposed to dispatch a redux action, which is handled by reducer function and apply a desired change to your store. redux-object
is just a utility, which helps to build JS object from normalized data, and knows very little about your application and storage architecture.
from redux-object.
I disagree that this should somehow be seen as obvious. We all know how redux works, else we wouldn't be here. The fact that you have used redux in the name of your library is confusing, there are others even on this issue that feel confused. If your library should have no knowledge of redux, why is redux in the title? Shouldn't it be called normalized-object?
In my case the normalized data that redux-object is building from, has redundant information in it, so it is not obvious to change. My hope was that this library would take care of all of this reference data simply. For example say that I have a table of people, and people have favorite_restaurants. What if 2 people have the same favorite restaurant id:4, and I want to remove that restaurant from my store. When this data comes from the server favorite_restuaruant is in the restaurant array, but also is referenced by the people who have it as a favorite. As it is, it's easier to just post to the server and remove the restaurant and update the store from the server.
from redux-object.
@benlieb, listen, I didn't try to insult you by saying "basic". My point was that everything what is supported is written in README. Otherwise, I provided a valid answer for the question.
Naming is the most hard problem in CS and I am not going to apologize for picking this name over another. Other folks were able to find it and use for quite some time, so maybe it's not perfect but works.
In my case the normalized data that redux-object is building from, has redundant information in it, so it is not obvious to change.
To me this sounds a bit weird. If data is normalized, it shouldn't have redundant information in the first place. In your example with restaurants, I would expect to have three entities: Restaurants, People and PeopleToRestaurants. If somebody removes restaurant from favorites, you would delete one record from the last one and other people would be not affected.
from redux-object.
Related Issues (20)
- Suggestion: Remove Lodash dependencies from the production build HOT 2
- Suggestion: Include unminified + minified bundles in dist
- Suggestion: Optionally include 'type' attribute in results HOT 2
- Accessing related object not in the store HOT 6
- Should not return empty array for relationships without data HOT 1
- support for resource object 'meta' tag HOT 1
- Change properties to be enumerable HOT 2
- 'meta' properties on relationships HOT 2
- Is it possible to convert an Object back to plain JSON? HOT 2
- Ability to do reflection on what is a relationship and what's not HOT 4
- Preserve type information for each object HOT 3
- Creating new objects across subsequent (identical) calls HOT 5
- {fetchFromMeta} missing? HOT 1
- It's not possible for resources and relationships to live under different reducers HOT 1
- Cyclical state HOT 1
- Selecting data when fetching from relationship JSONAPI endpoint HOT 2
- [Feat. Request] "resolved" optional? HOT 2
- redux-object/dist/bundle.min.js consists es6 syntax. Does not work with IE11 HOT 1
- Remove the core-js dep 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 redux-object.