You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run into an issue when porting a cellular automaton I coded in standard p5.js to a Next.js project. I managed to isolate the bug that I suppose is responsible for the code not working. Here's the isolated issue:
My files
The contents of index.js
importHeadfrom'next/head'importIssuefrom'@/components/p5/Issue'exportdefaultfunctionHome(){return(<><Head><title>++test++</title><metaname="description"content="Generated by create next app"/><metaname="viewport"content="width=device-width, initial-scale=1"/></Head><divclassName='w-screen h-screen relative'><Issue/></div></>)}
I run into an issue when porting a cellular automaton I coded in standard p5.js to a Next.js project. I managed to isolate the bug that I suppose is responsible for the code not working. Here's the isolated issue:
My files
The contents of
index.js
The contents of
issue.jsx
Expected Behavior
sketch
function is executed onceconsole.log('before for:', board)
incokurwa()
outputs a 2d array where each element isundefined
console.log('before for:', board[1][0])
incokurwa()
outputsundefined
Actual Behavior
sketch
function is executed two times, instead of oneconsole.log('before for:', board)
seems to output contents ofboard
after the for loop has executedconsole.log('before for:', board[1][0])
outputsundefined
like it logically shouldSteps to Reproduce the Problem
create-next-app
setupSpecifications
Package Version:
"@p5-wrapper/next": "^0.2.0"
The text was updated successfully, but these errors were encountered: