flexn-io / create

Build apps for web, TVs, desktops, consoles, wearables and more. Developer friendly UI library targeting all form factors platforms. Another notable feature is providing focus management for TVs which very easy to implement using Create.
https://create.flexn.org
MIT License
26 stars 6 forks source link

Feat/make create rn compatible #111

Closed aurimasmi closed 1 year ago

aurimasmi commented 1 year ago

Tested this on latest react-native-tvos https://github.com/react-native-tvos/react-native-tvos

Steps how to test it:

function Content() { return (

{ console.log('focus...'); }}> Hello from button Hello from button Hello from button

); }

function App(): JSX.Element { return ( <CreateApp style={{flex: 1}}>

  <CreateDebugger />
</CreateApp>

); } export default App;

mihaiblaga89 commented 1 year ago

@aurimasmi I also needed to install react-native-vector-icons as a dependency. ~However I can't run it on android. Snippet that you mentioned is added~ Android works after adding

import android.view.KeyEvent;

For tvos I get the error

Invariant Violation: requireNativeComponent: "TvFocusableView" was not found in the UIManager.
pavjacko commented 1 year ago

@aurimasmi @mihaiblaga89 it would be good to merge latest main here

aurimasmi commented 1 year ago

@aurimasmi I also needed to install react-native-vector-icons as a dependency. ~However I can't run it on android. Snippet that you mentioned is added~ Android works after adding

import android.view.KeyEvent;

For tvos I get the error

Invariant Violation: requireNativeComponent: "TvFocusableView" was not found in the UIManager.

tvos fix version 0.21.2-alpha.39

I also don't like react-native-vector-icons being there it supports single component. Happy to remove it or hear more opinions