Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
Redux-orm error, './../../../lodash/filter.js' does not provide an export named 'default'

I am pretty new to javascript and redux. My application's state got quite complex, while Redux by itself helps a lot, it lacks the capabilities for specifying which relationships there are within your data.

I am trying to update nested data with redux reducers/actions in javascript. i've tried using Redux-orm library but i get this error from console.

Uncaught SyntaxError: The requested module './../../../lodash/filter.js' does not provide an export named 'default'

I checked if the imports/exports are the source for this error, but i think its something else. Does someone know how to fix this?

My code:

import { Model, fk, attr, ORM } from 'redux-orm'



export class Cursus extends Model {
    static get fields() {
        return {
        id: attr(),
        cursus: attr(),
        code: attr(),
        naam: attr(),
        ec: attr(),
    
        }
      }
    static reducer(action, Cursus, session) {
      
        switch (action.type) {
          case 'CREATE_CURSUS': {
            Cursus.create(action.payload)
            break
          }
        }
        return undefined;
      }
      
    }
Cursus.modelName = 'Cursus';




export class Toets extends Model {
    static get fields() {
      return {
        id: attr(),
        toets: attr(),
        toetsvorm: attr(),
        weging: attr(),
        ectoets: attr(),
        periode:attr(),
        programmaleider:attr(),
                // foreign key field
                cursusId: fk({
                  to: 'Cursus',
                  as: 'cursus',
                  relatedName: 'toetsen',
              }),
        
      }
    }
  
    static reducer(action, Toets, session) {
      switch (action.type) {
        case 'ADD_TOETS': {
          Toets.create(action.payload)
          break
        }
      }
      return undefined;
    }
  }
  Toets.modelName = 'Toets'

  export const orm = new ORM()
  orm.register(Cursus, Toets)
import { createStore, combineReducers } from 'redux'
import { createReducer } from 'redux-orm'
import { orm } from '../model/Model.js'


const rootReducer = combineReducers({
  // Insert the auto-generated Redux-ORM reducer.  This will
  // initialize our model "tables", and hook up the reducer
  // logic we defined on each Model subclass
  entities: createReducer(orm)
})



export const store = createStore(
  rootReducer,
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda