I am new for SharePoint SPFx and React. I am searching for best practice code structure for SharePoint SPFx development using React. Basically I am looking for the code structure where I can put components, models, services and html files in separate folders.
How to use HTML templates file from folder name templates into component file (.tsx)
I have created new folder name 'common-library' inside root folder 'src' and putting all common/shared code like base configurations, models, services in separate folder which can be used in any webpart and react component.
You can check complete code here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.