Giter Site home page Giter Site logo

product-hunt's People

Contributors

ibraheemz avatar m-rwash avatar

Watchers

 avatar  avatar

product-hunt's Issues

Login modal

Problem:

I think its better for the content to be centered

Screen Shot 2021-03-24 at 12 07 59 AM

Expected view:

Screen Shot 2021-03-24 at 12 09 54 AM

Files/folders structure

  • Move static images to src/assets/images
  • Components structure could be grouped by modules/scope or grouped by its function; We could have something like this src/modules/product/ProductList.js, src/modules/product/ProductModal.js or we can have something like this src/components/lists/productList.js , src/components/lists/UsersList.js , src/components/modals/productModal.js.
    I like more the first approach cause its more readable and scalable
  • Move app.js and store.js to src/app
  • Move reducer.js to src/reducers
  • Move Header.js to src/modules/shared/layout/header/index.js
  • Move SideDiv.js to src/modules/shared/layout/SideDiv/index.js
  • Move LoginModal.js to src/modules/login/LoginModal.js

Destructing props

const Product = (props) => {

You can destruct this props directly like this const Product = ({ ProductVotes, id, ProductImg, ProductName, ProductDescription, CategoryLink, ProductCategory, CommentsNum }) => {

This way make it more descriptive

== operator

elementType == 'BUTTON' ||

Its recommended to always use === operator, as it doesn't do type conversion before comparing unlike the == operator which will do a type conversion before comparing.

For example;
5 === '5' // false Why? Cause they're different types
5 == '5' // true Why? Cause it converts both to the same type before comparing. JS will convert '5' (string) to 5 (integer) and then compare the two integers 5 and 5 hence it returns true.

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.