Our selector names are currently all over the place. Decide on a naming scheme and update selector names to match.
Suggest the following:
getByIdTables => returns a lookup object for all tables in the store. can lookup by ID. all tables are "full" -- all refefences-by-id are followed and details filled in.
Use this instead of getTablesById, which leads to confusion over whether its returning a lookup object or returning a single table for a provided ID
If we need a selector for querying a single object, use this naming schema:
getTableById => returns state.entities.tables.byId[given ID]. return object is "full" -- all references-by-id are followed and details filled in.
We should be able to remove any Full from the names, as the assumption should be that all selectors return a "full" object, i.e. one whose references-by-id have been followed and the details filled in.
Our selector names are currently all over the place. Decide on a naming scheme and update selector names to match.
Suggest the following:
getByIdTables
=> returns a lookup object for all tables in the store. can lookup by ID. all tables are "full" -- all refefences-by-id are followed and details filled in.Use this instead of
getTablesById
, which leads to confusion over whether its returning a lookup object or returning a single table for a provided IDIf we need a selector for querying a single object, use this naming schema:
getTableById
=> returnsstate.entities.tables.byId[given ID]
. return object is "full" -- all references-by-id are followed and details filled in.We should be able to remove any
Full
from the names, as the assumption should be that all selectors return a "full" object, i.e. one whose references-by-id have been followed and the details filled in.