MosaicGroups / mosaic-groups

A Mosaic groups application
GNU General Public License v3.0
6 stars 2 forks source link

List Users View #132

Closed BKreisel closed 7 years ago

BKreisel commented 7 years ago

Implement basic list users view and delete action.

jeffklassen commented 7 years ago

@BKreisel I'm merging this, but please checkout my comments above. Your work looks GREAT!

jeffklassen commented 7 years ago

Array.prototype.filter returns a new array, so you're doing it right!

On May 1, 2017 02:46, "Brandon Kreisel" notifications@github.com wrote:

@BKreisel commented on this pull request.

In client/src/App/reducers/users.js https://github.com/MosaicGroups/mosaic-groups/pull/132#discussion_r114089220 :

@@ -13,6 +13,12 @@ const users = (state = { ...state, isFetching: true };

  • case DELETE_USER:
  • const userId = action.user._id;
  • return Object.assign({},
  • state, { users: state.users.filter(user => user._id !== userId)}

do you have a recommendation of a better method for filtering? The Redux docs recommended not changing the original object if I read correctly.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/MosaicGroups/mosaic-groups/pull/132#discussion_r114089220, or mute the thread https://github.com/notifications/unsubscribe-auth/AHCOwMER3jj1nnf8jIQTGOAUkZMTANR8ks5r1StogaJpZM4NMbz8 .