Telash
Telash2y ago

Should I pass props or use imports inside the component?

No description
12 Replies
Telash
TelashOP2y ago
I currently use imports inside the comp what's best?
ghardin137
ghardin1372y ago
Do you think you’d change the images on the fly? Have different left arrows at different times?
Telash
TelashOP2y ago
Same arrows images that flips between 3 images
ghardin137
ghardin1372y ago
Then I’d say import them Doesn’t seem like they need to be props
Telash
TelashOP2y ago
Bro did you just Responded in 4s
ghardin137
ghardin1372y ago
I just happened to be looking at discord and the mobile app has notifications built in
Telash
TelashOP2y ago
They can be props, idk which way is best
ghardin137
ghardin1372y ago
I would import them in the component if they aren’t changing at runtime
Telash
TelashOP2y ago
Changing at runtime meaning?
ghardin137
ghardin1372y ago
Like some uses of that component have different or arbitrary images
Telash
TelashOP2y ago
Ok, ty:> I also think props is silly coz more code In this case
ghardin137
ghardin1372y ago
Yup

Did you find this page helpful?