Leveraging TypeScript to Create Better Polymorphic React Components | by Chisom Okoye | Jun, 2022

Write flexible components Reusable components are one of the key concepts in React — where you write a component once and get to reuse them multiple times. Basically your component would receive some props, You then go ahead to use these internally and then finally render some React element which gets translated to the corresponding … Read more

android – kotlinx.serialization.json.internal.JsonDecodingException: Polymorphic serializer was not found for missing class discriminator (‘null’)

I am using sealed class to handle api response. I am trying some code but getting some error of serialization. I tried this solution as well but it did not work. Can you guys help me out on this problem. I am new in serialization field. import kotlinx.serialization.Serializable sealed class ApiResponse<out T : Any> { … Read more