nicobarray / aquedux

Redux over the wire
46 stars 3 forks source link

Remove the ACTION_PREFIX in favor of a whitelist #2

Closed nicobarray closed 6 years ago

nicobarray commented 6 years ago

It should be less intrusive to specify which action types are sent over the wire to the aquedux-server and back to aquedux-client.

We currently prefix action types with AQUA: but it would be best to not modify the action types and expose an aquedux-client API like .moisten([]) or in the optional object parameter of the client instantiation, as follow:

    // On the client side.
    import { createAqueduxClient } from 'aquedux-client'

    const client = createAqueduxClient(store, ..., { actionTypes: [ /* Here */ ]});

    or 

    client.moisten([ /* Here */ ]);