A React Sample Application used for SPA demos
- The app is a single page application with multiple views.
- The following piece of code is already implemented in the app (inside
src/index.js
) which is responsible for triggering view.
if (typeof adobe != 'undefined' && adobe.target && typeof adobe.target.triggerView === 'function') {
let viewName = window.location.hash;
viewName = viewName.substring(2);
console.log("Triggering view: " + viewName);
adobe.target.triggerView(viewName);
}
git clone [email protected]:ietashish/react-sample-bees-app.git
- Download at.js for SPA from "Setup > Implementation > “Download at.js for SPA"
- Replace the at.js in
js
directory with the downloaded one.
cd
inreact-sample-bees-app
directorynpm install
npm run build
npm run start
The app will start at http://localhost:3000/