Insurbot Code Challenge
This is the solution referencing to the Chatbot Coding Challenge.
Live version is here.
This task was done in 2h.
Setup
Run yarn start
for development mode.
Further Work
Improvements:
Structure
[] Atomic Design Pattern by Brad Frost
Styling
[] Styling encapsulate in separate files
[] better provide theming
[] Use tooltips for buttons that give further instructions
[] Have a time delay with a ... content as message from the bot to give the user the feeling of writing with a bot instead of instant displaying the message.
Logic
[] Further improve the performance of the custom hook. Simple 2 lists (one for ordered flow messages and one for the given answers by the user). Idea would be to melt this into on single structure.
Error Handling
[] Error handling could be in a separate file
[] Toast or other component used to display error message
Typescript
[] Further specify
[] Remove duplication
Custom hooks
[] fetching of data could be in a separate hook