How we use Twitter Flight in TweetDeck

01 Mar 2014

This post is not an introduction Flight – it’s about patterns I’ve spotted in our Flight usage on TweetDeck. Some of it probably spills over into opinion about best practice, but I tried to keep that out as much as possible. We have just under 200 Flight components – around 14k lines of code – so we’ve tried lots of different things. This is a snapshot of my/our thinking right now.

This was originally posted to the Twitter Flight mailing list.


For example, we have a (very lightweight) DragDropController, and mixin called withDragDrop. These combine to allow any component to react to drag/drop behaviour – the controller just manages the start and end events that the individual components could not. Another example is the FocusController and withFocus.


Of course, we’re always evolving our practices so this stuff is likely to to change. I can also see us making a public git repository with some patterns and example code in the near future.