solid-docs icon indicating copy to clipboard operation
solid-docs copied to clipboard

CssAnimation Example Page: Code Doesn't Work

Open deshumake opened this issue 2 years ago • 0 comments

The given code doesn't work on this page: https://www.solidjs.com/examples/cssanimations. If I remember correctly, there are 3 things wrong.

  1. The page errors unless TransitionGroup is removed at the bottom
  2. It looks like boolean expressions don't work too well either

Ryan posted some code almost identical to what's on the website, in this sandbox: https://codesandbox.io/s/basic-css-transition-36rln?file=/index.js. Using Ryan's code here, there is another issue: When trying to use typescript, an error is thrown because the type expected on line 46 for the beforeEnter event is an "Element", but "Element" doesn't have a style prop on it. Should this be changed to an "HTMLElement" because those have style props on them? To work around this in my project, I just made a new type and extended "Element" with style

Otherwise, Ryan's code works in the sandbox, and on my machine. Not sure why it doesn't work on the solid website

deshumake avatar Feb 27 '23 08:02 deshumake