Solo
Solo

Reputation: 6977

Multiple imports from same package

import {
  FirstLongName,
  SecondLongName,
  ThirdLongName,
  FourthLongName,
  FifthLongName,
  SixthLongName
} from 'example-package';

VS

import { FirstLongName, SecondLongName, ThirdLongName } from 'example-package';
import { FourthLongName, FifthLongName, SixthLongName } from 'example-package';

Are there any technical or performance related implications when you use the second option?

(question is not about personal taste or any possible standards)

Upvotes: 0

Views: 133

Answers (1)

Randy Casburn
Randy Casburn

Reputation: 14185

Technical implications - none. I should add, the file will only be read once either way, so performance isn't to be concerned about. The current situation is such that transpilers are used to precompile these resources in advance. So any performance implications only affect the build process. More important to be consistent - pick one and stick with it.

Upvotes: 2

Related Questions