GithubHelp home page GithubHelp logo

chatlogs's Introduction

Chatlogs

Questions:

  • How would you achieve this with Redux?
I would remove any mention to the React state in the components and add that behaviour information on the redux store.

For that I would dispatch actions on the components to signal the UI changes.
Create the reducers to change the store based on the actions raised.
And I would use middleware library, like redux-thunk, to request the chatlog data from the API.
  • How would you handle an error from the API?
I could catch error with a catch on the request promise and add that information to the Redux store.
The UI would react to that showing a user friendly message on the screen.
  • If you were to continue this application, what would you add?
CI, Redux, a middleware library, SASS, SMACSS, a real server for the API, high level functional tests and integration, monitoring tools.
Of course that would change depending on how big the team thinks that the application may grow.
  • If you were to deploy this application (or any web application) to production, how would you personally do it?
I would like to have a one-click deployment infrastructure in place.
That would mean having a CI tool which would run:

  * Unit test;
  * Functional tests;
  * Integrations tests:
  * Check coverage;
  * Deployment scripts.

I also would like to have different hosts for the UI and the API so it gets easier to deploy and scale the app.
  • Finally, what did you think of the test? ๐Ÿ˜€
Fun test, small without being shallow, quite a feat :)
It was fun to use react-scripts as well, I had never used it before.
I did update the libraries since I was having some issues adding enzyme with the old versions of React and react-scripts.

Also, I added the following libraries:
  *  Enzyme and it's dependencies;
  *  Eslint and it's dependencies.

Sorry for not asking beforehand, I coded this at night :)

chatlogs's People

Contributors

rafaelaudy avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.