Git Product home page Git Product logo

Comments (11)

yishn avatar yishn commented on July 30, 2024

You’re probably using an old version of preact. Use a version that supports getDerivedStateFromProps, such as 8.4.2.

from shudan.

golf-x avatar golf-x commented on July 30, 2024

image
Upgraded to preact 8.4.2 but still does not work

from shudan.

yishn avatar yishn commented on July 30, 2024

Can you build and run the demo?

from shudan.

golf-x avatar golf-x commented on July 30, 2024

Can you build and run the demo?

Yes, I can.

from shudan.

golf-x avatar golf-x commented on July 30, 2024

I create a new preact project using create-preact-app with material template here and use Goban in shudan. it does not work.

Here is the git repository.
https://github.com/restingisimportant/preact-cli-shudan

Also i don't know why the stone does not appeared now, i must be missing something

from shudan.

yishn avatar yishn commented on July 30, 2024

In the git repository, you’re using an old version of preact. Are you sure you tried updating preact to 8.4.2?

from shudan.

golf-x avatar golf-x commented on July 30, 2024

In the git repository, you’re using an old version of preact. Are you sure you tried updating preact to 8.4.2?

Hi, Sorry i forgot to update it for this one, now i updated it already. but problems still persist.

image

Also, the board does not show up completely

from shudan.

yishn avatar yishn commented on July 30, 2024

I suspect it's a transpilation issue of [...Array(n)]. I've changed it to Array(n).fill(0) to circumvent it. Can you try updating Shudan to v1.3.12 and see if it's working for you?

from shudan.

golf-x avatar golf-x commented on July 30, 2024

image
Board does show correctly now.

image
However, build command still not success.

You can test by this repository
https://github.com/restingisimportant/preact-cli-shudan

from shudan.

yishn avatar yishn commented on July 30, 2024

It seems like preact-cli doesn't support getDerivedStateFromProps during prerender yet. Either don't use prerender (by running preact build --no-prerender like it suggested) or use the non-stable next version of preact-cli.

from shudan.

golf-x avatar golf-x commented on July 30, 2024

It seems like preact-cli doesn't support getDerivedStateFromProps during prerender yet. Either don't use prerender (by running preact build --no-prerender like it suggested) or use the non-stable next version of preact-cli.

I got issue about preact build --no-prerender before. it does work now.
Thank you very much.

from shudan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.