react-tv / react-tv-navigation

React Navigation for TVs
https://www.npmjs.com/package/react-tv-navigation
69 stars 16 forks source link

Initial react-tv setup throws and error with react-tv-navigation #9

Open metoikos opened 6 years ago

metoikos commented 6 years ago

Hi all. First of all, thank you for your great effort to create an ecosystem around smart tv's.

I've just set up my development environment as instructed and started dev server with yarn start command and navigated to http://localhost:8080 with chrome browser. On the page, I had this error in console;

Uncaught Error: Argument appears to not be a ReactComponent. Keys: tag,key,type,stateNode,return,child,sibling,index,ref,pendingProps,memoizedProps,updateQueue,memoizedState,mode,effectTag,nextEffect,firstEffect,lastEffect,expirationTime,alternate,_debugID,_debugSource,_debugOwner,_debugIsCurrentlyTiming

Complete output here: http://dpaste.com/3EHE8C5

It's default boilerplate code of the react-tv-cli nothing added.

So I just removed withFocusable HOC and tried to render with standard component and everything just worked. I couldn't quite figure out what is the problem here. Couple days ago I tried react-tv-navigation with react-dom (just replaced ReactTV.findDOMNode with ReactDOM.findDOMNode) to test if it is capable of achieving my needs on tv app and it just worked that time.

So, what could cause this, any idea?

raphamorim commented 6 years ago

Thank you @metoikos for the report!

Yeah, I know what is 😢 I need to update the way to work with refs on react-tv-navigation to the newest React-TV renderer.

raphamorim commented 6 years ago

@celiolatorraca can you take a look?

parisaabasian commented 6 years ago

I have the same problem, @raphamorim Did you figure it out?what should I do? :(

raphamorim commented 6 years ago

yeah @parisaabasian, please re-install react-tv-cli@latest. Just fixed it to React versions <=16.2.0