Friday, December 27, 2019

The feature name "records" does not exist in the state, therefore createFeatureSelector cannot access it.

This error came for me in having an store shaped like so:

import { IModelStore } from "../models/model-store";
export interface IMainStore {
   records: IModelStore
}
export const ModelStore: IModelStore = {
   records: null
}

 
 

I replaced it with this:

import { IModelStore } from "../models/model-store";
export interface IMainStore {
   models: IModelStore
}
export const ModelStore: IModelStore = {
   records: null
}

 
 

The doubleup of the name "records" was somehow making things sick!

No comments:

Post a Comment