infernojs / inferno

:fire: An extremely fast, React-like JavaScript library for building modern user interfaces

Home Page:https://infernojs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Inferno renders a component incorrectly

farooqkz opened this issue · comments

Hello. I think I'm overlooking something so I thought you could help me with this.

I have a RoomView component which renders just fine:
https://github.com/farooqkz/chooj/blob/main/src/RoomView/RoomView.js#L319

Unless I use this MembershipEvent component as what RoomEvent(used in RoomView) returns which is later a child of RoomView's div

https://github.com/farooqkz/chooj/blob/main/src/RoomView/RoomEvent.js#L15

I've also tried rendering something else instead of what MembershipEvent renders now but same result.

Can you clarify what is the expected result there? What are you trying to accomplish?

I quickly checked through the code you rereferred here and it seems there is some filtering and mapping in RoomView.js render method. You could try adding key prop to your RoomEvent / ScrollIntoView, the key should stay the same when you are expecting the component to update instead of unmount / re-mount.

I am trying to have a list of RoomEvents in there but when I render MembershipEvent, upon mounting RoomView I have my TabView component in its place. See the attachment
bug

How do you debug that repository without kaiOs device?

How do you debug that repository without kaiOs device?

The screencast is from a KaiOS device.

Yeah I understand that, but I believe there is some simple mistake in the application code, but as I'm unfamiliar with the code base and I don't know what the application is supposed to do, its difficult for me to give you hint how to fix the issue. I dont have access to KaiOS device

Yeah I understand that, but I believe there is some simple mistake in the application code, but as I'm unfamiliar with the code base and I don't know what the application is supposed to do, its difficult for me to give you hint how to fix the issue. I dont have access to KaiOS device

Ah okay thank you anyway.