|
|
|
|
|
by zackbrown
1286 days ago
|
|
Pax does solve this, but we're now discussing a different problem than element-level look-and-feel or accessibility. Three ways you can slice this with Pax, ft. pseudocode: 1. Conditional templating, like: <SomeLayout>
if $is_android {
//Only render the back button for Android
<BackButton />
}
/* ... */
</SomeLayout>
2. Dynamic properties where Rust logic checks for the target platform, like: <SomeElement some_property={self.get_platform_specific_value()} />
3. Maintain a separate codebase (or different specific components) for each target platform, in the spirit of React NativeOr any mix of the above. |
|