question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vite React example (Javascript + Typescript)

See original GitHub issue

Is your feature request related to a problem? Please describe. Vite is a blazing fast build tool that supports many frontend frameworks, including React and React Typescript. I personally set up Redux for Vite React Typescript manually many times in the last couple of months. It would be helpful for the community if we have an official Vite template for Redux/ Redux Toolkit

Describe the solution you’d like

  • Add official templates for Vite React Redux Javascript and Vite React Redux Typescript.

Describe how should we implement this feature

  • Add new repositories vite-react-template-redux and vite-react-template-redux-typescript
  • Or move all examples to a single monorepo

Other things to keep in mind

  • React 18 is pretty new and React 17 is still widely used. We might need to consider adding examples for react@17 and react-redux@17 as well? Need a discussion for this.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gengjiawencommented, Jul 6, 2022

@gengjiawen I am not quite sure that you are looking at the correct repo. Both examples (typescript and javascript) in nvh95/vite-react-template-redux are using redux-toolkit

nvh95/vite-react-template-redux@021b4f6/javascript/src/features/counter/counterSlice.js#L1

nvh95/vite-react-template-redux@b7cddcb/typescript/src/features/counter/counterSlice.ts#L1

I missed the deps part. Works good on my side. Thx for sharing this.

1reaction
markeriksoncommented, Apr 25, 2022

Hey, thanks for helping with this!

I’d say we should go with React 18 / React-Redux v8. That’s what the CRA templates already do, and those are the “latest” versions of each package. I know there’s still some compat issues in the broader ecosystem, but I don’t think going with the older versions in a new project template would really be helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a TypeScript React Application with Vite
A tutorial that shows how to create a TypeScript-based React app using Vite.
Read more >
How to set up a Front-End project with Vite, React, and ...
This will scaffold a Vite project with React and TypeScript pre-configured and ready for us to work on. The project folder structure should ......
Read more >
Getting Started - Vite
You can navigate to vite.new/{template} to select which framework to use. The supported template presets are: JavaScript, TypeScript. vanilla · vanilla-ts · vue ......
Read more >
Setup a new React application with Vite + TypeScript | by Thi ...
Today I will start writing a new series called React Hero where I can ... Simple words: TypeScript = JavaScript + Static typing...
Read more >
Vite with TypeScript - Robin Wieruch
A brief walkthrough on how to upgrade Vite from JavaScript to TypeScript. The tutorial assumes that you have already created a React project ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found