Foreman and Katello's Javascript Ecosystem - What the Flux?

I’m afraid I don’t understand how redux-thunk breaks principles of Redux. If you don’t use getState (and we don’t do that AFAIK) it should be fine. What parts of our code do you find in contradiction with what Dan Abramov recommends? I’m aware only about enabling/disabling RH repos where we trigger the api calls directly from a component.

There’s definitely some boilerplate that we can reduce by custom middleware and helpers. But I’d say that’s normal evolution.

The directory structure has been discussed here: Suggestion: Refactor the react_app folder structure People preferred keeping actions and reducers in the same folder as the components. I personally find it more convenient too as I can directly see all the related React and Redux bits at one place.

After the dir structure discussion Foreman started migrating towards this pattern. New code in Katello has been written in this manner too. At the moment the plan is to get rid of the redux/{actions,reducers} folders and of course move the code from move_to_* folders to the appropriate projects. That’s in progress but it’s going to be longer process.

I recently sent a PR that adds basic UI devel docs into Foreman’s storybook: https://github.com/theforeman/foreman/pull/5883
It’s a good place to put all patterns and standards we agree on. The plan is to extend it with further information in future.