Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Test on React-Native #1

Closed
ericvicenti opened this issue Oct 30, 2018 · 11 comments
Closed

Test on React-Native #1

ericvicenti opened this issue Oct 30, 2018 · 11 comments
Labels
help wanted Extra attention is needed

Comments

@ericvicenti
Copy link
Contributor

I haven't actually run hooks yet on RN because its quite complicated right now. This was developed on the web.

Could somebody test this on a RN app and see if anything funky happens?

@ericvicenti ericvicenti added the help wanted Extra attention is needed label Oct 30, 2018
@sunnylqm
Copy link

Just tried useNavigation and it works great!
With these dependencies: (rn 0.57.5 from facebook/react-native#21967 (comment))

  "dependencies": {
    "react": "^16.7.0-alpha.2",
    "react-native": "npm:@brunolemos/react-native",
    "react-native-gesture-handler": "^1.0.9",
    "react-native-screens": "^1.0.0-alpha.16",
    "react-navigation": "^3.0.0",
    "react-navigation-hooks": "^1.0.0-alpha.2"
  },

@JasCodes
Copy link

I can confirm that too..

@ArcticFaded
Copy link

I am currently writing a full app using react native alpha, I'll let you know about the issues I might run into. I am going with an approach without redux but so far its working fine.

@phpsmarter
Copy link

Hi, It is really really great ! last day I wrote a lot of RN StackNavigation Pages . In the dreaming ,I realize it must be a good idea use react-hooks to handle react-navigation event. so , I find this repo.

I'm so excited.Thanks!

@mensonones
Copy link

mensonones commented Jul 28, 2019

Don't work react-native 0.60.4 sintaxe error in import module...

@Jta26
Copy link

Jta26 commented Aug 17, 2019

Don't work react-native 0.64 sintaxe error in import module...

Same issue on .60.5.

The Import Error caused by

import * from 'react-navigation-hooks'

can be worked around by just importing each module separately.

e.g.
import { useNavigation, useNavigationState } from 'react-navigation hooks

@slorber
Copy link
Member

slorber commented Aug 29, 2019

import * from 'react-navigation-hooks'

@Jta26 : This is not a valid ES import in the first place

Don't work react-native 0.64 sintaxe error in import module...

@mensonones RN 0.64 does not exist yet and you don't provide any error message. People are able to import this lib successfully already (including me)


This project was developed initially at a time where RN didn't support hooks. It was developed against a react-native-web project and Eric couldn't at that time test it in a real RN app easily.

This project does work in RN (despite some bugs and the contribution experience is not great) so I'm closing this issue.

#38 should fix many bugs regarding focus and event system, will be merged soon

#28 should bring an example app to make it easier to test contributions in a real app

#2 is the issue about writing a test suite

@slorber slorber closed this as completed Aug 29, 2019
@mensonones
Copy link

Hey, @slorber . Sorry, I didn't realize that I had spelled the wrong version. Adjusted...

@slorber
Copy link
Member

slorber commented Aug 29, 2019

what's the syntaxe error message and the version of the lib you are using @mensonones , i can't do anything without more infos

@moyolvera
Copy link

There's some documentation or guide about how to test with jest?

@slorber
Copy link
Member

slorber commented Nov 9, 2019

@moyolvera you can check #16

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants