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

Update nextjs-ts template #879

Open
wants to merge 2 commits into
base: testnet3
Choose a base branch
from

Conversation

oguzutku1745
Copy link
Contributor

@oguzutku1745 oguzutku1745 commented Apr 23, 2024

Motivation

The old Next.js template lacked a deploy function, and worker logic was not defined, unlike in the React example. This new template is more properly defined.

Test Plan

  • A deploy function has been added to both the frontend and workers.
  • A Wrapped AleoWorker has been used instead of directly interfacing with the worker, as demonstrated in working examples that use Vite.
  • .aleo handling has been added to both the tsconfig and next.config files.
image

I encountered a circular dependency error that I couldn't identify using the tools I've previously used, such as circular-dependency-plugin and madge.

 ⚠ Circular dependency between chunks with runtime (_app-pages-browser_node_modules_aleohq_sdk_dist_index_js-_app-pages-browser_node_modules_aleo-25fba6, _app-pages-browser_src_app_workers_worker_ts, runtime)
This prevents using hashes of each other and should be avoided.

The potential impacts of this error should be analyzed for large-scale applications; however, I haven't observed any effects on the Next.js example that I designed to demonstrate how to interact with the network through on-chain executions. You can check the live demo.

For local development, I believe the new template will serve as a better starting point for Next.js users.

Related PRs

No related PRs.


oguzutku1745 added a commit to Aleo-DevRel-Ambas/zero-to-zk that referenced this pull request Apr 26, 2024
Installation commands updated depends on the current command usage. I created 2 PR to update some of the templates:

ProvableHQ/sdk#880
ProvableHQ/sdk#879
zklim pushed a commit to Aleo-DevRel-Ambas/zero-to-zk that referenced this pull request May 9, 2024
Installation commands updated depends on the current command usage. I created 2 PR to update some of the templates:

ProvableHQ/sdk#880
ProvableHQ/sdk#879
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 this pull request may close these issues.

1 participant