web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

create a front-end template for svelte

Open luu-alex opened this issue 1 year ago • 3 comments

This feature is similar to the other issues of supporting front-end framesworks, a PR for this should be creating a front-end project using svelte + web3.js. We have had an issue with users experiences issues with svelte so it may include debugging as well.

Expected behavior

Actual behavior

Steps to reproduce the behavior

  1. [First step]
  2. [Second step]
  3. [and so on...]

Logs

Environment

luu-alex avatar Sep 10 '24 15:09 luu-alex

related to #7133

luu-alex avatar Sep 10 '24 15:09 luu-alex

I created a Svelte project with npm init svelte and updated it to use Web3.js to display the current block number. I did not have any problems with circular dependencies as reported in #7133. In order to get things working, I had to use the ssr page option to disable server-side rendering since the browser-only global window object is needed to instantiate Web3.js with an injected provider.

danforbes avatar Sep 11 '24 15:09 danforbes

@danforbes glad to hear it, I closed the other issue out

luu-alex avatar Sep 11 '24 21:09 luu-alex