2
\$\begingroup\$

please let me know if this question doesn't meet community standard for code review (I will delete it)

Hey, I am probably terrible in naming files, functions etc.

We follow atomic design principle. More here

I have a react app where we put small components like button, label etc and call it atoms.

In that I have made loading and Error component responsible for displaying loading bar and Error alert respectively.

Then I created a molecule status which contains both these components

// Reports current status of the application
// For loading display loading bar
// for Error shows, error component
import React from 'react'
import Loading from 'components/atoms/loading'
import Error from 'components/atoms/ErrorAlert'
import { MoleculesStatus } from '@types'
import _ from 'lodash'

export default function Status({ projects }: MoleculesStatus) {
  const loading = _.get(projects, 'loading')
  const error = _.get(projects, 'error')
  return (
    <>
      <Loading loading={loading} />
      <Error error={error} />
    </>
  )
}

In the PR, I have been asked to search about atomic design naming convention and write more understandable naming. Can someone help me in understanding, what's wrong with my naming as per atomic design and what naming would be more appropriate?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.