datatlas-erasme / front

🗺 [DEPRECATED] DatAtlas frontend is an interface to create maps with custom data, style and features.
https://github.com/datatlas-erasme/datatlas
6 stars 0 forks source link

Redux usage #97

Closed lutangar closed 2 years ago

lutangar commented 2 years ago

enhance #96

lutangar commented 2 years ago

@OlivPi @Pipazoul here's my preliminary work on #97 still a draft tho, but I'm curious :

lutangar commented 2 years ago

@OlivPi @Pipazoul feel free to make some comments on my WIP : https://github.com/datatlas-erasme/front/pull/97/files

Pipazoul commented 2 years ago

@lutangar Can you rephrase the sentence about the app reducer ? wich file is involved ? i'm not sure that i got it right.

I dont remember using receiveMapConfig before

lutangar commented 2 years ago

the app reducer was sometimes populated with stuff but none of these was actually used, right ? I didn't see any selector trying to get something from the state.app slice...

@Pipazoul https://github.com/datatlas-erasme/front/blob/dev/src/store/reducer.js

Actions may be fired in the code (see https://github.com/datatlas-erasme/front/blob/dev/src/factories/panel-toggle.js#L37). While it does populate state.app, there are no selectors (useSelector()) querying this part of the state : this reducer is never used.

Pipazoul commented 2 years ago

the app reducer was sometimes populated with stuff but none of these was actually used, right ? I didn't see any selector trying to get something from the state.app slice...

@Pipazoul https://github.com/datatlas-erasme/front/blob/dev/src/store/reducer.js

Actions may be fired in the code (see https://github.com/datatlas-erasme/front/blob/dev/src/factories/panel-toggle.js#L37). While it does populate state.app, there are no selectors (useSelector()) querying this part of the state : this reducer is never used.

Ah yes I havent used it