Giter Club home page Giter Club logo

dualn_back's People

Contributors

unjamini avatar

Watchers

 avatar

dualn_back's Issues

Small fixes

  • .eslintrc is empty, so can be deleted
  • .prettierrc.js can be deleted since it duplicates rules from ESLint
  • Do we actually need App.js file since it is just a Root inside? Maybe better use Root directly in index.js?
  • Better avoid comments in Russian in the code. You never know who'll read it later ๐Ÿ˜‰
  • Prefer using exact objects for Flow types
  • Optionally you can move Navigator to a separate component. It's up to you, because here it's the only one, so it won't add much here, but for other projects it can be helpful, because you split the navigation from the other logic
  • For useState you added types like this: const [mistakes: number, setMistakes] = useState(0);. Not sure if it works correctly, but anyway better use the approach with generic: const [mistakes, setMistakes] = useState<number>(0). In this case Flow will automatically get correct types both for the value and for the setter
  • Better add Flow annotation to the styles files. In this case Flow will get their type after importing
  • That's really great that you used React Navigation v.5.0. You can go even further and for function components use navigation not from the prop which we get from the HOC, but use useNavigation hook instead. In this case the props will take only parents' props which can make the code more clear
  • In Session/index.js you can omit else case since it's redundant
  • Better avoid using do ... while loops like you did in answersIndexes since they are less readable and always can be replaced with regular while, for or functions like map or forEach
  • When you want to check if some element exists in the array, it's better to use includes instead of indexOf as you did in answersIndexes

Refinement tips

  • Seems like you need to move ESLint config from .eslintrc to .eslintrc.js, otherwise it will not be used. See https://eslint.org/docs/user-guide/configuring#configuration-file-formats. Also better fix all ESLint warnings and errors.

  • Using Props in src/containers/Results/utils.js is a bit misleading, probably better to type-hint the arguments themselves, but it's up to you.

  • Better remove all commented and redundant code e.g. commented styles for button in src/containers/Results/styles.js, the files with reducer and actions for Results container, newline in the middle of src/containers/Session/components/PositionedSquare/styles.js.

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.