Giter Club home page Giter Club logo

bonsai's Introduction

Bonsai

.github/workflows/bonsai.yml

Although Facebook develops the React Native framework, they delegated the role of developing a CLI tool to the community. As a result, several solutions emerged in the community. There are tools like Expo that combine a framework and tooling around it, and react-native-community/cli that is considered the official CLI.

As a user taking the first steps with React Native, Expo provides convenient workflows, packages, and services so that you don't have to leave the Expo ecosystem. However, that convenience comes with the cost of strong dependency on the Expo environment, which is oriented towards selling services: projects are structured the Expo way and they have their own solution for setting up their modules. At some point, users feel they need that convenience but without being tied to their ecosystem.

The official React Native CLI doesn't have such a strong dependency on an ecosystem. It provides useful commands, auto-linking of native code, and a build pipeline that can be used by Gradle and Xcode build to run Metro alongside the app. However, it doesn't solve two common inconveniences that developers are still facing these days: upgrading RN is painful, and requiring Ruby & CocoaPods for linking the native iOS code adds an unnecessary indirection and make the user-experience error-prone.

Bonsai is an attempt to take a different approach:

  • Project generation Xcode projects and build.gradle files are an implementation detail required to compile the app. Therefore, Bonsai could generate them when needed and ensure they have the right structure for a given RN version.
  • Built-in linking: Bonsai could leverage the project generation phase on iOS to auto-link the native code of third-party dependencies pulled by NPM/Yarn. Like react-native-cli does, but without having to run cd ios && pod install, nor having to make sure that the Xcode project is properly configured.
  • Opinions: Like Rails or Redwood, Bonsai could make decisions on behalf of users to simplify the configuration, and bring them more focus.

Although it builds upon ideas from Expo and the react-native-cli, we are building this as a new tool to be able to prototype and validate the aforementioned ideas with ease. Those tools are mature and thus introducing such a radical change to their design would be a tedious process that would imply getting approval from the community and align all the maintainers of the tool. Moreover, it'd be challenging to safely migrate users to the new approach without breaking anything on their end.

We believe that Bonsai can be another valid approach to manage React Native projects and that users should be free to pick the one that aligns best with their needs.

Setup

  1. Clone the repository git clone [email protected]:bonsaijs/bonsai.git.
  2. Install dependencies yarn install

bonsai's People

Watchers

 avatar

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.