vanjs-org / van

🍦 VanJS: World's smallest reactive UI framework. Incredibly Powerful, Insanely Small - Everyone can build a useful UI app in an hour.
https://vanjs.org
MIT License
3.84k stars 88 forks source link

Update Van JSX #233

Open ravensiris opened 9 months ago

ravensiris commented 9 months ago

@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.

Tao-VanJS commented 9 months ago

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

cqh963852 commented 8 months ago

@ravensiris I have create a refactor PR . PTAL

Tao-VanJS commented 8 months ago

Hi @ravensiris,

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

ledihildawan commented 8 months ago

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

cqh963852 commented 7 months ago

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

It seems a wrong import. let me fix this.