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

Next.JS App Router example is broken/outdated #2589

Closed
kaumac opened this issue Apr 26, 2024 · 3 comments
Closed

Next.JS App Router example is broken/outdated #2589

kaumac opened this issue Apr 26, 2024 · 3 comments

Comments

@kaumac
Copy link

kaumac commented Apr 26, 2024

Current Behavior

The app-demo example on the free starter is broken.
App router is moving towards being the default for NextJS, It'd be great to have a working starter for this.

Expected Behavior

You should be able to bootstrap, compile and run the starter-free tamagui starter without getting any errors.

Tamagui Version

1.95.1

Platform (Web, iOS, Android)

Web

Reproduction

- Initialize with `starter-free`
- Remove the `pages` directory and rename `app-demo` to `app`
- The first compilation error will be that the Next router is not initialized. This is because the Solito version is outdated and using an api that doesn't work with the app router. It should import everything from `solito/navigation` instead of `solito/link`.
- The next problem is that the toast doesn't work.

Still testing things, but the app router demo feels very untested.

System Info

System:
    OS: macOS 14.1.2
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 989.16 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.5.0 - ~/.nvm/versions/node/v21.5.0/bin/node
    Yarn: 4.1.0 - ~/.nvm/versions/node/v21.5.0/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v21.5.0/bin/npm
  Browsers:
    Chrome: 124.0.6367.60
    Edge: 124.0.2478.51
    Firefox: 120.0.1
    Safari: 17.1.2
  npmPackages:
    @babel/runtime: ^7.18.9 => 7.21.0
    @manypkg/cli: ^0.19.1 => 0.19.2
    check-dependency-version-consistency: ^3.0.3 => 3.0.3
    eslint: ^8.21.0 => 8.39.0
    node-gyp: ^9.3.1 => 9.3.1
    prettier: ^2.7.1 => 2.8.8
    turbo: ^1.10.3 => 1.10.3
    typescript: ^5.3.3 => 5.3.3
@jonsherrard
Copy link
Contributor

@kaumac Made some updates to the starter as I've been running appDir and pagesDir in parallel on my own project.

The PR is tagged. Would love it if you could try it and see if it works for you and makes sense?

@SamuraiF0x
Copy link
Contributor

Fix for this was merged (tamagui/starter-free#26), check if your issues are resolved now and let me know :)

@kaumac kaumac closed this as completed May 28, 2024
@gcoakleyjr
Copy link

@SamuraiF0x the PR was good, except I think there are a few types in terms of pages or app for instance, the and <ToastViewport left={0} ..etc /> works for app and pages was already fine.

And also on user screen, line 30 should be app I think

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

No branches or pull requests

4 participants