Closed DanTup closed 8 years ago
I have reproduced this and tested with the latest version of the bindings (1.8.5, which doesn't include anything specifically to address this issue, I just thought that it was worth a try).
I'll have to have a poke around and try to find out what's going on.
Incidentally, React recommends against rendering direct to the document body, the production version of React (which you should be using until you actually release) shows the following warning:
Warning: render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.warning
React recommends against rendering direct to the document body
Yeah, I actually noticed that warning right after posting and changed this! I was sure there was a reason but couldn't remember why; now it's all clear!
It turns out that this down to a misunderstanding that I had in relation to when static fields are initialised on generic types. I think I know how to fix it, it shouldn't be too big of a deal.
I've pushed a new version of the library to NuGet (1.8.6) that includes this fix.
I have two components which I (accidentally) had sharing the same props class (which is empty):
When I render these components:
I unexpectedly get
Content
written out twice.