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

skatejs support #71

Open
silenceisgolden opened this issue Jan 30, 2018 · 1 comment
Open

skatejs support #71

silenceisgolden opened this issue Jan 30, 2018 · 1 comment

Comments

@silenceisgolden
Copy link

Just tried to take a stab at adding support for https://github.com/skatejs/skatejs but ran into a few issues:

  1. Jest seems to not be friendly with custom elements since you cannot extend HTMLElement. I see Implement [HTMLConstructor] extended attribute jsdom/webidl2js#88 and Support for WebComponents API jsdom/jsdom#1030 that have no positive resolution and require fundamental changes in jsdom.
  2. What should an example of using unistore with a skatejs component look like? My current assumption is something like:
import { withComponent } from 'skatejs';
import { connect } from 'unistore/skatejs';

const actions = store => ({
  // ...
});

class TestComponent extends connect('count', actions, withComponent()) {
  render({ count }) {
    return `Count is ${count}`;
  }
}

Thoughts?

Thanks!

@developit
Copy link
Owner

Only way to combat the Jest/JSDOM issue would be to switch to a browser for tests - we could switch to karmatic without changing much.

Does Skate support component composition? I wouldn't normally push connect() into a mixin like that, but maybe that's more idiomatic for Skate.

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