Page's files Setup
- Open pages folder and create three files
Home.jsx
,Profile.jsx
,CreateCampaign.jsx
andCampaignDetails.jsx
and typerafce
in each file and presstab
to get the basicReactArrowFunctionComponentExport
template. - Create a file
index.js
in the pages folder and export all the pages from there.
export { default as Home } from './Home';
export { default as Profile } from './Profile';
export { default as CreateCampaign } from './CreateCampaign';
export { default as CampaignDetails} from './CampaignDetails';
- Now go to
App.jsx
and import all the pages fromindex.js
file.
import { Home, Profile, CreateCampaign, CampaignDetails } from './pages';