Title: Document method to call on refs · Issue #419 · rescript-react-native/rescript-react-native · GitHub
Open Graph Title: Document method to call on refs · Issue #419 · rescript-react-native/rescript-react-native
X Title: Document method to call on refs · Issue #419 · rescript-react-native/rescript-react-native
Description: Bringing this over from Discord as requested by @MoOx. I'm basically not sure if this is the right way to use refs and if the external I've defined in the following example should be exposed in the repo: open ReactNative; open ReactNavig...
Open Graph Description: Bringing this over from Discord as requested by @MoOx. I'm basically not sure if this is the right way to use refs and if the external I've defined in the following example should be exposed in the...
X Description: Bringing this over from Discord as requested by @MoOx. I'm basically not sure if this is the right way to use refs and if the external I've defined in the following example should be expose...
Opengraph URL: https://github.com/rescript-react-native/rescript-react-native/issues/419
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Document method to call on refs","articleBody":"Bringing this over from Discord as requested by @MoOx. I'm basically not sure if this is the right way to use refs and if the external I've defined in the following example should be exposed in the repo:\r\n\r\n```reason\r\nopen ReactNative;\r\nopen ReactNavigation;\r\n\r\n// TODO: add to TextInput?\r\nexternal elementToObj: TextInput.element =\u003e Js.t({..}) = \"%identity\";\r\n\r\n[@react.component]\r\nlet make = (~navigation: Navigation.t) =\u003e {\r\n open Navigation;\r\n let (text, onChangeText) = React.useState(() =\u003e \"Home\");\r\n let ref = React.useRef(Js.Nullable.null);\r\n\r\n React.useEffect0(() =\u003e {\r\n let intervalId =\r\n Js.Global.setTimeout(\r\n () =\u003e\r\n switch (ref-\u003eReact.Ref.current-\u003eJs.Nullable.toOption) {\r\n | Some(_ref) =\u003e _ref-\u003eelementToObj##focus()\r\n | None =\u003e ()\r\n },\r\n 5000,\r\n );\r\n Some(() =\u003e Js.Global.clearTimeout(intervalId));\r\n });\r\n\r\n \u003c\u003e\r\n \u003cTouchableOpacity\r\n onPress={_ =\u003e navigation-\u003eNavigation.navigate(\"PrivacyPolicy\")}\u003e\r\n \u003cText\u003e {React.string(text)} \u003c/Text\u003e\r\n \u003c/TouchableOpacity\u003e\r\n \u003cTextInput ref onChangeText={text =\u003e onChangeText(_ =\u003e text)} /\u003e\r\n \u003c/\u003e;\r\n};\r\n```","author":{"url":"https://github.com/cem2ran","@type":"Person","name":"cem2ran"},"datePublished":"2019-04-20T09:00:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/419/rescript-react-native/issues/419"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:af74f204-8161-0156-b277-fe386c951b54 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E262:1C7DFD:59A1219:7425700:697548DA |
| html-safe-nonce | 2e081fff99c66c99c5e1c31cdf981ab6f2b7201291f7b198c7c8f7d627e4a849 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjYyOjFDN0RGRDo1OUExMjE5Ojc0MjU3MDA6Njk3NTQ4REEiLCJ2aXNpdG9yX2lkIjoiMzExNTk4ODc3MjAzODQ2MTY1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7311732001638b767513c4fccf8f6dfc4bf3f06d84e0c9e0e9fc8553f785b3d7 |
| hovercard-subject-tag | issue:435373671 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rescript-react-native/rescript-react-native/419/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4fb94e54c054a345b7f91d29f24b2399bc1db69af39a5ce9142a0480cc24125d/rescript-react-native/rescript-react-native/issues/419 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4fb94e54c054a345b7f91d29f24b2399bc1db69af39a5ce9142a0480cc24125d/rescript-react-native/rescript-react-native/issues/419 |
| og:image:alt | Bringing this over from Discord as requested by @MoOx. I'm basically not sure if this is the right way to use refs and if the external I've defined in the following example should be exposed in the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cem2ran |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/rescript-react-native/rescript-react-native git https://github.com/rescript-react-native/rescript-react-native.git |
| octolytics-dimension-user_id | 54703302 |
| octolytics-dimension-user_login | rescript-react-native |
| octolytics-dimension-repository_id | 86237257 |
| octolytics-dimension-repository_nwo | rescript-react-native/rescript-react-native |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 86237257 |
| octolytics-dimension-repository_network_root_nwo | rescript-react-native/rescript-react-native |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width