Comments (10)
As a sidenote: I think tons of issues are going to disappear.
Right now if I go from <p className="foo">Foo</p>
to <p>Bar</p>
then the className is not deleted.
Is suspect because it receives null
instead of {}
...
from snabbdom-pragma.
Forget it. You do send {}
in case of null and you have the tests to verify it, so why do I get destructuration issues 😥
from snabbdom-pragma.
Ok I get it. You don't sanitize props if the sel is a function (custom components). So doing something like
function MyCustomStuff({ someProp }) {
return <div someProp/>;
}
But using it like this
<MyCustomStuff/>
// which desugars to
h(MyCustomStuff, null, []);
// instead of
// h(MyCustomStuff, {}, []);
breaks down. Even if we use default arguments in the component implementation (because null !== undefined
).
Should we consider this a bug ? Or should we also sanitize props when using custom components ?
from snabbdom-pragma.
Would you accept a PR @Swizz or ?
from snabbdom-pragma.
Any progress on this?
from snabbdom-pragma.
Hi,
I have no ETA on this.
TBH I am not using Snabbdom anymore as I am now a contributor/member of Hyperapp.
Maybe, I will proceed with PR only at the moment.
from snabbdom-pragma.
I have a fix at: https://github.com/blikblum/snabbdom-pragma/tree/allow-components-without-props
waiting for #29 to create the PRs
from snabbdom-pragma.
If anyone is interested i published a package with the fix as snabbdom-pragma-lite.
With bonus you get 30% smaller code, no dependency on extend and 10x faster in real world usage
from snabbdom-pragma.
In case some of you are interested in this, I am open of transferring ownership or adding you as a contributor, as you wish.
from snabbdom-pragma.
I would be happy to take the duty of maintaining it
from snabbdom-pragma.
Related Issues (20)
- Add Typescript transpiler HOT 1
- Performance improvements HOT 18
- Typescript strict mode supported? HOT 16
- 'animate', 'animateTransform' are SVG elements HOT 3
- Typescript rewrite
- VNodes in children become undefined after createElement() HOT 12
- Add ES6 module build HOT 8
- Having trouble with all attributes besides Class and ID HOT 3
- Unable to run test scripts HOT 2
- Setting a data attribute with more than one dash does not work HOT 6
- 'No default export' error with TypeScript HOT 1
- Certain SVG attributes aren't parsed
- Destructuring "type parallelism" error in createElement
- Compilation failures with TypeScript 3.2 HOT 1
- Span with value zero can break application
- Hi. Does snabbdom-pragma work with esbuild?
- not rendering properly data and aria attributes HOT 3
- Is `h('div#id.class1.class2', ...)` needed ? HOT 2
- Consider to return a vnode object instead of calling h() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snabbdom-pragma.