-
Notifications
You must be signed in to change notification settings - Fork 295
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
Question: #277
Comments
Good question. I had to switch to React and React Native as this framework doesn't seem to be maintained on a regular basis (therefore too dangerous to rely on it for production). |
Good question. I have been written JSX in Vue SFC whenever the vue compiler compiles my code wrongly. Here I will summarize my current findings, in case anyone encountered surprises:
(0, React.createElement)(vm.$options.components['TextInput'], {
value: vm['value'],
onChange: function onChange(value) {
return value = value.nativeEvent.text;
},
style: (0, _vueNativeHelper.mergeNativeStyleAndNativeClass)(undefined, undefined),
'__react__vue__customEventmodel': (0, _vueNativeHelper.event)(function ($event) {
vm['value'].apply(this, arguments);
}.bind(this))
}) (0, React.createElement)(vm.$options.components['TextInput'], {
value: vm['value1'],
onChange: function onChange(value) {
return vm['value1'] = value.nativeEvent.text;
},
style: (0, _vueNativeHelper.mergeNativeStyleAndNativeClass)(undefined, undefined),
'__react__vue__customEventmodel': (0, _vueNativeHelper.event)(function ($event) {
vm['value1'].apply(this, arguments);
}.bind(this))
})
(0, React.createElement)(vm.$options.components['Gallery'], {
value: vm['abc'],
onChange: function onChange(value) {
return vm['abc'] = value.nativeEvent.text;
},
style: (0, _vueNativeHelper.mergeNativeStyleAndNativeClass)(undefined, undefined),
'__react__vue__customEventmodel': (0, _vueNativeHelper.event)(function ($event) {
vm['abc'].apply(this, arguments);
}.bind(this))
})
|
source refs: incorrect isNative check (affects v-on, v-bind, v-directive)vue-native-core/src/compiler/parser/index.js Line 487 in 853fb25
vue-native-core/src/compiler/parser/index.js Line 502 in 853fb25
hard coded v-modelvue-native-core/src/compiler/parser/index.js Lines 513 to 521 in 853fb25
incorrect v-model="value" onChange bindingvue-native-core/src/compiler/parser/index.js Line 517 in 853fb25
vue-native-core/src/compiler/parser/index.js Line 520 in 853fb25
it uses 'babel-core' (outdated package)
|
if (bindRE.test(name)) { // v-bind |
even if you write
v-bind:="object"
will not work, since addProp
/addAttr
does not handle.vue-native-core/src/compiler/parser/index.js
Lines 477 to 481 in 853fb25
if (isProp || platformMustUseProp(el.tag, el.attrsMap.type, name)) { | |
addProp(el, name, value) | |
} else { | |
addAttr(el, name, value) | |
} |
However, there is logic to handled
v-bind="$props"
specially. But since the v-bind
directive is not processed in the parser, this also don't work.vue-native-core/src/platforms/vue-native/compiler/codegen/RenderGenerator.js
Lines 88 to 92 in 6e24f26
// for template $props eg: v-bind:$props | |
if (filterDirectiveBindProps(ast).length) { | |
props = `Object.assign({}, vm.$props, ${props})`; | |
props = `${COMMON.handleProps.name}(${props}, '${ast.tag}')`; | |
} |
@maxencedouet we are focusing mainly on critical fixes right now, such as #259. Due to other work, the fixes have been getting delayed. But the project is being maintained. @lkho Thanks for the detailed summary. We'll look into this further. There are a lot of inconsistencies and edge cases right now and we're trying to work on them as well. |
This framework is currently not being maintained, if anyone is looking for help you can join the following discord, and I will assist you as soon as i could: discord.gg/rPgwrD9gYa |
@RishabhKarnad , does this framework is still maintained ?
The text was updated successfully, but these errors were encountered: