Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support React 18? #73

Closed
yunsii opened this issue Aug 27, 2022 · 20 comments · Fixed by #96
Closed

Support React 18? #73

yunsii opened this issue Aug 27, 2022 · 20 comments · Fixed by #96

Comments

@yunsii
Copy link

yunsii commented Aug 27, 2022

Whether consider support React 18?

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

Yes!

@yunsii
Copy link
Author

yunsii commented Aug 27, 2022

Is it coming soon? I'm using vite-plugin-react-pages to custom my starter-vite-react-library[WIP], and it's not easy to integrate with PageStrategy as my mind 😂

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

What problem do you encounter with PageStrategy ? It is related to React 18?
Is this doc helpful to you? https://vitejs.github.io/vite-plugin-react-pages/advanced-fs-routing
(I am also planning to write Chinese translation of document: #74)

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

Is it coming soon?

I expect one week of work to do the migration (React Router 6 + React 18).

@yunsii
Copy link
Author

yunsii commented Aug 27, 2022

What problem do you encounter with PageStrategy ? It is related to React 18?

No, just react-dom warning in console. Convention over configuration, maybe provide a official PageStrategy auto load page data is better. like: https://d.umijs.org/guide/basic

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

Convention over configuration, maybe provide a official PageStrategy auto load page data is better. like: https://d.umijs.org/guide/basic

Agreed. Currently the default "convention" is only suitable for app. I should provide a PageStrategy that can be reused by library developer. dumi is indeed a great project to learn from.

@yunsii
Copy link
Author

yunsii commented Aug 27, 2022

Maybe I can do something for the repo, is there a roadmap?

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

That would be greate! Contributions are very welcome. You can start with writing (or improve) playground and template to satisfy specific needs of users.
For example, your library template would be a great demo for users that want to create a library. Currently our library template is not very practical because it doesn't include build scripts to build the library (it only have scripts to run and build demo).
The demo document site is also not very practical. We can use vite-pages to build sites that has features like docusaurus.io, d.umijs.org, storybook.js.org. They are greate examples of document sites. We can also bring those feature to improve vite-pages document site.
By doing that, we can know what features are missing and valuable for users, and implement them in the theme-doc or vite-pages-core. Hopefully, you will be familiar with this repo by then, and be able to implement those features!
If you want to start with a concrete feature, you can try to implement docuement search in the theme doc. Anyway, your ideas and discussions about missing feature is already great help for this project!

Building this project have helped me to learn many things like vite, ssr, docusaurus, github ci...... It let me learn by implementing. Hopefully it can help you too.

is there a roadmap?

I use issues to track TODO (clear feature demand) . I have some vague ideas in my mind (such as more powerful demo rendering like storybook.js, better TS interface info extraction), but they are not clearly designed yet.

@yunsii
Copy link
Author

yunsii commented Aug 27, 2022

Great, start with my lib template is good idea, but there is a question, how to integrate with my template, I will improve it continuously. By init script or others?

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

Great, start with my lib template is good idea, but there is a question, how to integrate with my template, I will improve it continuously. By init script or others?

You can continue improve your template in your repo. And when it is ready, we can add a build script before publishing create-vite-pages ("scripts: {"pull-template-lib": "script to pull template from you repo into this repo..."}") to pull your template into this package.

@yunsii
Copy link
Author

yunsii commented Aug 27, 2022

So where to place pull-template-lib script? I'm not understand.

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

In the package.json of create-vite-pages:

https://github.com/vitejs/vite-plugin-react-pages/blob/main/packages/create-project/package.json

I will run the script before publishing the package.

@csr632
Copy link
Member

csr632 commented Aug 27, 2022

I just updated the url in the previous comment. Sorry for the broken url 😂

@yunsii
Copy link
Author

yunsii commented Aug 27, 2022

Got it. I'm working on it now, the aim today is working as my expected routes 😂

@Evansy
Copy link

Evansy commented Nov 3, 2022

@csr632 Is it updated?

@csr632
Copy link
Member

csr632 commented Nov 3, 2022

@csr632 Is it updated?

Sorry for the delay! I haven't implement it because of lack of time. But since somebody have request for it, I will put more priority on it. I will implement this in a week.

@qiaogaolong
Copy link

@csr632 How long will it take for React Router 6 + React 18 to release a version,

@csr632
Copy link
Member

csr632 commented Nov 7, 2022

@csr632 How long will it take for React Router 6 + React 18 to release a version,

I am working on a update that:

And it will be a new major version. I will release an alpha version this week.

@qiaogaolong
Copy link

@csr632 Thanks for your hard work,If it is successful, please tell me, I will always pay attention

@csr632
Copy link
Member

csr632 commented Nov 13, 2022

It's done! Currently it is published in an alpha version. Check it out: #96

@csr632 csr632 mentioned this issue Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants