-
Notifications
You must be signed in to change notification settings - Fork 33
What is the equivalent to render for react-basic-native? #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To give a little more context, I am trying to finish this example: main :: Effect Unit
main = do
ex <- mkCounter
??? ex 0
mkCounter :: Component Int
mkCounter = do
component "Counter" \initialValue -> React.do
counter /\ setCounter <- useState initialValue
pure $ R.button
{ onPress: capture_ (setCounter (_ + 1))
, title: "Increment: " <> (show counter)
}
|
Okay turns out it is this simple :)
|
|
Okay thank you for the information. I am trying out a Just to confirm, when you say "should have its own equivalent "render the app root" concept" you mean that this does not current exist? |
It's just that I'm not very familiar with react native, so I don't know if I can answer whether that's a good approach 😅. I know react native app mounting is a bit different from web though. If you're just worrying about making the top level PS type a react component and then wiring that up in JS that should be fine. |
Hi, I'm really interested in using this library for a react-native application at the company I work for. However I am having a hard time getting the most simple example working. I can't seem to find the equivalent to render for
react-basic-hooks
.The text was updated successfully, but these errors were encountered: