Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Van JSX #233

Open
ravensiris opened this issue Jan 11, 2024 · 5 comments
Open

Update Van JSX #233

ravensiris opened this issue Jan 11, 2024 · 5 comments

Comments

@ravensiris
Copy link

@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
Copy link
Member

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

@cqh963852
Copy link
Contributor

@ravensiris I have create a refactor PR . PTAL

@Tao-VanJS
Copy link
Member

Hi @ravensiris,

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

@ledihildawan
Copy link

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

@cqh963852
Copy link
Contributor

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

It seems a wrong import. let me fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants