question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native Hot Reload breaks tcomb-form-native

See original GitHub issue

Version

  • tcomb-form-native: 0.4.0
  • react-native: 0.22.0-rc4

Expected behaviour

React Native 0.22 introduces Hot Reload and after a code change the hot reload behaviour should not break the plugin.

Actual behaviour

After a code change the plugin throws an error.

Steps to reproduce

  1. New react native project
  2. Add a tcomb-form-native form
  3. Enabled Hot Reload in the app
  4. Make a change while the app is running

Stack trace and console log

The error that is thrown: [tcomb][tcomb-form-native] missing stylesheet config

Additional information

  • The error is thrown in the Form.render method by the assert
  • The stylesheet variable is indeed undefined after a code change
  • The other asserts fail as well (templates and i18n)
  • Hot Reload works by wrapping components with a shell that can reloads its component, so somehow the assignments in the index.js file are ignored

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:11
  • Comments:44 (23 by maintainers)

github_iconTop GitHub Comments

5reactions
sirwoetangcommented, May 10, 2016

For those on the same low level as I am, it seems that the import implementation:

var t = require('tcomb-form-native')
var Form = t.form.Form

does not work as of 0.4.3

2reactions
gcanticommented, May 11, 2016

Hey guys, is everything ok now?

Sorry @alvaromb, the wrong export was my fault.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing Hot Reloading - React Native
The idea behind hot reloading is to keep the app running and to inject new versions of the files that you edited at...
Read more >
React Native CLI project: How to fix hot reload when using ...
To fix this I've found that I need to have a class based root component since hot reload does not support functional root...
Read more >
State of React Native 2018 - Hacker News
The biggest problem I've run into with React Native has been their ... hot reload is a much better experience than react-native or...
Read more >
How to do validation with React Native package tcomb-form ...
Coding example for the question How to do validation with React Native package tcomb-form-native-React Native.
Read more >
Learn React Native Developer Tools
Hot Reloading is not gonna reload your entire application. It's just going to patch the code that was changed and keep the state...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found