Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default component name while importing in react native?

I want to import a component named "Create" while importing I want to change its name. But I cannot change the component name as I export the "Create" component as default.

import Create as CreateCustomer from 'sales_app/src/screen/customer/Create' ;

I am new to react-native. Need Help.

like image 781
MD. IBRAHIM KHALIL TANIM Avatar asked Sep 02 '25 16:09

MD. IBRAHIM KHALIL TANIM


1 Answers

You can rename default import like this

  import { default as CreateCustomer } from 'sales_app/src/screen/customer/Create';
like image 76
Kaushik Avatar answered Sep 06 '25 22:09

Kaushik