Coder Social home page Coder Social logo

ndinata / react-native-template-opinionated Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 5.0 584 KB

An opinionated starter template for new React Native projects.

Home Page: https://www.npmjs.com/package/react-native-template-opinionated

License: MIT License

JavaScript 11.37% Java 41.08% Objective-C 12.68% Ruby 13.79% C 0.58% Swift 0.32% TypeScript 16.05% Objective-C++ 4.14%
react-native react-native-cli template typescript

react-native-template-opinionated's Introduction

Hi there ๐Ÿ‘‹

I'm Nico; i'm a software engineer with experience working with React Native, Nextjs, and Flask (Python).

The repos that you'll find here are mostly side projects to help me hone my skills and pursue interests, which currently include building various things with Typescript and Rust ๐ŸŒฑ

react-native-template-opinionated's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-template-opinionated's Issues

Remove console statements in prod

Add babel-plugin-transform-remove-console to avoid performance issues in production builds in case any console statements are left behind.

`npm test` not working on a newly-initialised project

Running npm test on a newly-created project fails with the following error messages:

ReferenceError: You are trying to `import` a file after the Jest environment has been torn down. From __tests__/App-test.tsx.
...
 The above error occurred in the <ForwardRef(NavigationContainerInner)> component:
at theme (project/node_modules/@react-navigation/native/src/NavigationContainer.tsx:55:5)
        at App (project/src/App.tsx:31:52)

    Consider adding an error boundary to your tree to customize error handling behavior.
    Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.

Related to react-navigation/react-navigation#9727.

Options:

  1. Do nothing on the template side (other than a disclaimer in readme) and let consumers work it out themselves
  2. Remove __tests__/App-test.tsx from template and let consumers set up tests themselves
  3. โœ… Incorporate react-native-testing-library (react-navigation/react-navigation#10943 (comment)) (much thanks to this linked comment!)

In the end, the react-native-testing-library route was chosen because it fixes the issue and encourages testing best practices.

Fixed in v8.4.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.