The Sitecore Search Starter Kit's code shows a departure from previous Sitecore samples by using Vite. This tool is a build tool for modern web development, offering fast development and optimized production builds through a modern JavaScript toolchain.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FunPoielxVd8i85QIBt4if%2Fead01af4a1e84c435894d3a40e357a67%2Fjean-gerber-vkCyrRJsHss-unsplash.jpg&w=3840&q=75)
What is Vite?
In the past, React sample code introductions have often described the creation of a new project as follows in many cases
npm create-react-app my-app
Create React App has been introduced in the past as the procedure for creating a new project, but a recent visit to the React website Start a New React Project reveals the following nuances.
- Next.js - Full Stack React Framework - powered by Vercel
- Remix - Full Stack React Framework - powered by Shopify
- Gatsby - React Framework for sites using CMS - powered by Netlify
- Expo - For Native Apps
It is not even introduced on the official React website. vite If you do a search using the two keywords create-react-app, you will find that many articles refer to create-react-app as being out of role. The most recent successor to this is vite.
Create a project in Vite
Now let's actually create a project. The commands are as follows
npm create vite@latest
When you run it, it will ask you for the name of the project.
![vite01.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1cVdN3s5KRLbRtpwYSwYud%2F39a30f1d998f2fd2353651382285b6f0%2Fvite01.png&w=3840&q=75)
In this case, we will proceed as is. Next, a list will be displayed regarding the framework to be used.
![vite02.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F47MWlV45zt2p8Os1tAOXn2%2F688a2c8bdcbab8cd981f098d7f36ae1d%2Fvite02.png&w=3840&q=75)
If you select React, you will now be asked to confirm Typescript / JavaScript.
![vite03.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4QI4QhRenpK99vdPBsTaiL%2F62872c50b1c7589883a58a3899ede630%2Fvite03.png&w=3840&q=75)
Select typescript.
![vite04.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6ACUmUV825xBhXadW88dUE%2Fc00366e6d4a208b090b6b4b9225e4222%2Fvite04.png&w=3840&q=75)
The project is now complete.
Running a Vite project
To execute, simply use the command after creation to get up and running.
cd vite-project
npm install
npm run dev
When executed, the screen changes as follows.
![vite05.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2Fz2MUxASilXMQZL5j3p1ag%2F17bcb34a08d27a52a589192beab44fc3%2Fvite05.png&w=3840&q=75)
If you access the URL shown, you will see the React app running as shown below.
![vite06.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FOWQX8kT9SfAFqXJYfYqW4%2F98570b452cdf216867261928c91e2f63%2Fvite06.png&w=3840&q=75)
Please see Codesandbox for an actual demonstration.
In addition, looking again at the starting screen, it states that help is displayed when h is pressed. What happens if I click on it with the keyboard?
![vite07.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7uFFUrKoatE7Ph6YcUxLTF%2Fb2f0c7577252841dc80c69298932c61e%2Fvite07.png&w=3840&q=75)
By using the keyboard, you can restart an application, open a browser, or close an application. This shortcut will help you work more efficiently.
Summary
Until now, the react sample has been create-react-app, but from now on, I will use vite when I introduce it on this blog.