van icon indicating copy to clipboard operation
van copied to clipboard

Update Van JSX

Open ravensiris opened this issue 1 year ago • 5 comments

@cqh963852

Seems like the van-jsx is behind on npm.

I'm getting:

error TS2322: Type 'State<string>' is not assignable to type 'string'

when trying

const state = van.state("")
<input value={state} onchange={e => state.val = e.target.value} />

which seems to be fixed here

currently using a workaround by having this in my package.json:

{
...
"vanjs-jsx": "https://gitpkg.now.sh/vanjs-org/van/addons/van_jsx?main"
}

and with the current version in main branch it seems to work without ts errors.

ravensiris avatar Jan 11 '24 13:01 ravensiris

@cqh963852, could you take a look at this issue?

Tao-VanJS avatar Jan 11 '24 16:01 Tao-VanJS

@ravensiris I have create a refactor PR . PTAL

cqh963852 avatar Jan 20 '24 02:01 cqh963852

Hi @ravensiris,

The PR was merged. You can upgrade vanjs-jsx to 0.2.0 to use the updated implementation.

Tao-VanJS avatar Jan 20 '24 17:01 Tao-VanJS

Hi @ravensiris, there are some errors when I was refresh the page.image

ledihildawan avatar Jan 29 '24 14:01 ledihildawan

Hi @ravensiris, there are some errors when I was refresh the page.image

It seems a wrong import. let me fix this.

cqh963852 avatar Feb 17 '24 06:02 cqh963852