-
Notifications
You must be signed in to change notification settings - Fork 18
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
Support React 16 Fragments #23
Comments
Looks like we probably need to remove the key from the returned object here https://github.com/skatejs/val/blob/master/src/index.js#L71. Are you able to submit a PR? |
@treshugart No. Sorry, for now I just decided not to bother trying to use I don't like the requierd wrapper and |
There's no real way around this. There' could be a separate import of
I can respect that. I'd be interested in moving to a flatter model. You still need heuristics for events, props and attributes, though. If you have any thoughts around this, I'd be interested in hearing them. The current API was experimenting with what it would look like based on a React RFC.
Class name should work if it's set as a prop, which is the default. Not sure why booleans don't work, but they should. |
I guess I can't really offer a suggestion for general webcomponents right now. I'm only using Polymer components, which are completely straightforward in the heuristics needed. In the past when discussions in React/ReactDOM/JSX themselves came up about custom attributes/events I thought then that symbols/registration might be a decent way to handle them. const onSelectedItemChanged = React.registerEvent('selected-item-changed');
// ...
<paper-dropdown-menu
label="Your favourite pastry"
[onSelectedItemChanged]={this.selectPastry}>
<paper-listbox slot="dropdown-content">
<paper-item>Croissant</paper-item>
<paper-item>Donut</paper-item>
<paper-item>Financier</paper-item>
<paper-item>Madeleine</paper-item>
</paper-listbox>
</paper-dropdown-menu> Though even if you wanted that, you don't have the ability to update JSX to add ES2015's computed property notation as valid syntax to JSX prop names.
Oh I didn't see that props are set as properties on the ref instead of just left to react. I didn't see anything about it in the readme and assumed that "Everything else is just passed through and subject to the standard behaviour of whatever library you're using" meant that all other props are just given to React/Preact/etc... to keep standard behaviour. Although know that I know that, I'm not even sure if that's actually behaviour that I want. It's really hard to decide. |
Sure, but this library is for those consuming a Polymer / Skate / whatever web component element within React / Preact etc.
React doesn't set props which is why you need to take over the property setting for anything that isn't special to React. If you were to say Using the I'm spitballing some of the flatter structure in the v1 branch. EDIT I've updated it to use |
I can mostly get on board with that. My problem is that while I dislike the idea that React suddenly switches to attributes when it sees a custom element tag, I am even more worried about the idea that all of a sudden all the props I pass are being managed through a I'm still waiting to see what happens in React with the discussions about properties and attributes. Meanwhile, I guess I went ahead and created an RFC (reactjs/rfcs#28) for that |
When using val+React 16 and the new fragments I get an error.
When I remove the
@jsx
andh
created by@skatejs/val
it starts working again.The text was updated successfully, but these errors were encountered: