Closed compulim closed 7 years ago
Makes sense. I favor:
sendMessage
/sendFiles
into Store.ts with all the other redux stuffFormatOptions
, ActivityOrId
and other types into a new Types.tskonsole
into a new Konsole.ts (or Utilities.ts) fileThat's what I am thinking too.
What do you think about splitting up Store.ts
into Actions.ts
, ActionFactories.ts
, Reducers.ts
, and Store.ts
?
Perhaps Actions.ts
might be ReduxActions.ts
for disambiguity of BF buttons.
Or in its own folder, like Redux/Store.ts
?
I like the strategy of not creating more structure than is necessary. There's not really a problem having all the Redux stuff in one file. Makes its easy to jump around between actions and factories and reducers and epics. They're all pretty interrelated. So since it's not causing a problem... I say leave it as it is for now.
Done in #672.
Currently,
test/history.ts
is depending onStore.ts
, and is depending onChat.tsx
. And that means our Mocha tests that target Redux, is also loading React code, before running the test in Node.js.The code in
Store.ts
that importChat.tsx
is attached below. It is loading some types and action factories.I think we should put an isolation between Redux and React code by refactoring out types and action factories into their own files.