This is simple Create React App application. Run yarn(npm i) and yarn start(npm run start) in order to install dependencies and to run application;
- Messages list is reversed. To show new messages ast the bottom of the list;
- You can send new message on
enter, however onshift + enteryou can add new line; - User is hardcoder by default to
{ id: 1 }, but you can change the user by adding to the query string:http://localhost:3000/?userId=2; - When you hit
enterto send a new message UI doesn't wait response from a server. it was done intentionally to show someOptimisticUI approach; - Selected chat is highlighted.
- Date format internationalization.
- BEM naming convetion for the styles.
- Will work on last 1 version of: Edge, Firefox, Chrome.
- There is not much of decomposition, because app itself quite small and simple. The only component that I moved out of the
AppisInputcomponent. BecauseInputwas sharing state withAppand affected the performance of the whole app; - It would be nice to add
ProptypesorTypescriptto describe data structures in the app more eloquently; - This app could have been implemented using
Websocketsto make this app more responsive and reactive; - Missing
esLintconfig; - No tests though, sorry :)
