title: Ngrx feature selector returns memorized function
body: <p>I did everything step by step ad <a href="https://github.com/ngrx/platform/blob/master/docs/store/selectors.md" rel="nofollow noreferrer">ngrx docs</a> says but in the end instead value I'm getting memorized function. I went thru github issues but seems to me I did everything correct, so could anybody help me to figure out what I'm doing wrong? </p>
  
  <p>my code below </p>
  
  <p>app.index.ts</p>
  
  <pre><code>import {ActionReducer, createFeatureSelector, createSelector, MetaReducer} from '@ngrx/store';
  import * as fromCategories from '../categories/store/categories.index';
  
  export interface State {
    categoryState: fromCategories.State
  }
  
  export const reducers = {
    categoryState: fromCategories.categoryReducers
  };
  
  export const selectCategoriesFeature = createFeatureSelector&lt;fromCategories.State&gt;('categoryState');
  export const selectCategoriesFeatureArray = createSelector(selectCategoriesFeature, (state: fromCategories.State) =&gt; state.categories);
  </code></pre>
  
  <p>categories.module.ts</p>
  
  <pre><code>@NgModule({
    imports: [
     ...
      StoreModule.forFeature('categoryState', categoryReducers),
      EffectsModule.forFeature([CategoriesEffects]),
    ],
  ...
  </code></pre>
  
  <p>categories.index.ts</p>
  
  <pre><code>import {Category} from '../categories';
  import * as categoryReducer from './categories.reducer';
  
  export interface State {
    categories: Category[]
  }
  
  export const categoryReducers = categoryReducer.reducer;
  </code></pre>
  
  <p>categroies.reducer.ts</p>
  
  <pre><code>import * as CategoriesActions from './categories.actions';
  import {State} from './categories.index';
  
  export type Action = CategoriesActions.All;
  
  const initialState: State = {
    categories: null
  };
  
  export function reducer (state = initialState, action: Action): State {
  
    switch (action.type) {
  
      // GET CATEGORIES LIST
  
      case CategoriesActions.GET_CATEGORIES: {return state}
      case CategoriesActions.GET_CATEGORIES_ERROR: {return state}
      case CategoriesActions.GET_CATEGORIES_SUCCESS: {
        initialState.categories = action.payload;
        return Object.assign({}, initialState);
      }
  
      default: {
        return state;
      }
    }
  }
  </code></pre>
  
  <p>categories.actions.ts</p>
  
  <pre><code>import { Action } from '@ngrx/store';
  import {Category} from '../categories';
  
  // *******************************************************************
  
  // const
  
  export const GET_CATEGORIES  = '[Category] Get items';
  export const GET_CATEGORIES_ERROR = '[Category] Get items error';
  export const GET_CATEGORIES_SUCCESS  = '[Category] Get items success';
  
  // get categories
  
  export class GetCategories implements Action {
    readonly type = GET_CATEGORIES;
    constructor(public payload?: any) {}
  }
  
  export class GetCategoriesError implements Action {
    readonly type = GET_CATEGORIES_ERROR;
    constructor(public payload: Response) {}
  }
  
  export class GetCategoriesSuccess implements Action {
    readonly type = GET_CATEGORIES_SUCCESS;
    constructor(public payload: Category[]) {}
  }
  
  export type All
    = GetCategories
    | GetCategoriesError
    | GetCategoriesSuccess
  </code></pre>
  
  <p>categories.component.ts</p>
  
  <pre><code>import * as fromRoot from '../store/app.index';
  import {selectCategoriesFeatureArray} from '../store/app.index';
  
  @Component({
    selector: 'app-categories',
    templateUrl: './categories.component.html',
    styleUrls: ['./categories.component.css']
  })
  
  export class CategoriesComponent implements OnInit {
  
    categories$: any;
  
    constructor(private store: Store&lt;fromRoot.State&gt;) {  }
  
    ngOnInit() {
      console.log(selectCategoriesFeatureArray)
    }
  }
  </code></pre>
  
  <p>and this is what console log returns </p>
  
  <blockquote>
    <p>ƒ memoized() {
            if (!lastArguments) {
                lastResult = t.apply(null, arguments);
                lastArguments = arguments;
                return lastResult;
            }
            for (var /** @typ…</p>
  </blockquote>