Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM CS Version with React and Typescript

Avatar

Level 1

Hi,

 

I created a AEM React SPA using the latest archetype.

Now, I am trying to replace Javascript with Typescript.

  • Could you please let me know if it is compatible with AEM.
  • please share me any steps available to do the same?
  • Also, share is it possible to provide typescript as an input while creating AEM React SPA using Archetype mvn command?

Thanks,

Priyanka

 

2 Replies

Avatar

Employee Advisor

Hi @priyankamathur1 ,

 

Typescript support is available for : https://www.npmjs.com/package/@adobe/aem-react-editable-components

Have you already set up react-SPA with aem ?

Thanks,

Milind

Avatar

Level 1

Not actually, I am still in the process of setting up the project archtechture.

 

These are the archetype properties which I am using for setting up the project,

 

# Parameters used to generate this project with aem-project-archetype

groupId=com.adobe.aem.myproject.react
artifactId=my-project-spa
version=1.0.0-SNAPSHOT
package=com.adobe.aem.myproject.react
appId=my-project-spa
appTitle=My Project SPA
aemVersion=cloud
sdkVersion=latest
languageCountry=${languageCountry}
includeExamples=n
includeErrorHandler=n
frontendModule=react
singleCountry=y
includeDispatcherConfig=y
includeCommerce=n
includeForms=n
includeFormsenrollment=n
includeFormscommunications=n
sdkFormsVersion=latest
datalayer=y
amp=n
enableDynamicMedia=n
enableSSR=n
precompiledScripts=n
 
It creates a project which has React with the JS architechture.
 
I want it to be React with Typescript architechture.
 
Is it possible to provide typescript as an input while creating AEM React SPA using Archetype mvn command? 
Because manually I do not want to change the '.js' files deliberately to the '.tsx' files.
 
Thanks,
Priyanka