Giter VIP home page Giter VIP logo

react-native's Introduction

Cycle.js

logo
A functional and reactive JavaScript framework for predictable code

Welcome

Question Answer
"I want to learn Cycle.js" Read the official documentation
"I have a question" Create a StackOverflow question
Or
Join the chat
Or
Open an issue
Please note all discussion-like issues are labeled discussion and immediately closed. This doesn't mean we unconsidered your discussion. We only leave actual issues open.
"I found a bug" Open an issue
"I want to help build Cycle.js" Read the Contributing guides
Then
Choose an issue marked "help wanted"

Packages

Cycle.js is comprised of many specialized packages. This repository contains all these packages, e.g., the npm package @cycle/run lives in the directory run. Below you will find a summary of each package.

Package Version Dependencies DevDependencies
@cycle/dom npm (scoped) Dependency Status devDependency Status
@cycle/history npm (scoped) Dependency Status devDependency Status
@cycle/html npm (scoped) Dependency Status devDependency Status
@cycle/http npm (scoped) Dependency Status devDependency Status
@cycle/isolate npm (scoped) Dependency Status devDependency Status
@cycle/most-run npm (scoped) Dependency Status devDependency Status
@cycle/run npm (scoped) Dependency Status devDependency Status
@cycle/rxjs-run npm (scoped) Dependency Status devDependency Status

Globally: Build Status devDependency Status

Stream libraries

The following packages are not under Cycle.js, but are important dependencies, so we display their latest versions for convenience.

Package Version
most npm version
rxjs npm version
xstream npm version

Support OpenCollective OpenCollective

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Thanks

Browserstack

Browserstack for providing access to their great cross-browser testing tools.

LICENSE

The MIT License


JS.ORG ComVer

react-native's People

Contributors

barelyhuman avatar jevakallio avatar justinwoo avatar ohanhi avatar ryota-ka avatar staltz avatar uk-ar avatar wclr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native's Issues

React Native future support

Love the simplicity of cycle.js over redux, but still being new to react native, I am a little worried react native won't be a priority for cycle.js support. What is the plan for integrating with react native?

@cycle/react-native deprecated in favor of @cycle/react?

Hi there,

Looking at https://github.com/staltz/manyverse it seems that doing React Native with Cycle.js isn't best done with this module anymore?

Drawing from the code in manyverse, I was able to get things going (including with RN Web and Expo) with only @cycle/react and the following code in App.js of any expo boilerplate:

import { TouchableOpacity, View, Text } from "react-native";
import { h, makeComponent } from "@cycle/react";

const main = function(sources) {
  const inc = Symbol();
  const inc$ = sources.react.select(inc).events("press"); // Press will work in RN and RN Web

  const count$ = inc$.fold(count => count + 1, 0);

  const elem$ = count$.map(i =>
    h(TouchableOpacity, { sel: inc }, [
      h(View, [h(Text, {}, `\n\n\n\nCounter: ${i}`)])
    ])
  );

  return {
    react: elem$
  };
};

const App = makeComponent(main); // makeComponent(main, drivers) is also possible.

export default App; // To make Expo happy.

rendering issue on iOS , @cycle/run, delayed creation

issue
run doesn't work as expected as nothing is shown on the screen unless a delay is added and setup is used instead of run.

eg:

const prog = setup(main, {
  react: makeReactNativeDriver(appName),
});

setTimeout(() => {
  prog.run()
}, 1);

This was discussed in a PR previously and I finally got time to review the cause.

It's because of the weird implementation of setImmediate on the iOS side of things, which never really works as needed, or to be fair there's no scheduling at all and things execute literally immediately and the contextual wait never really happens.

Which in turn makes it impossible for quicktask to execute the addition of listeners which is done in @cycle/run

A quick fix for this on the user side is to change this in the index.js code right before run()

global.setImmediate = fn => setTimeout(fn, 1);
// or 
// global.queueMicrotask = fn => setTimeout(fn, 1);

run(main, {
  react: makeReactNativeDriver(appName),
});

It's not a graceful solution but I don't think we need to patch quicktask to change it's priority but instead if run could just use timeout, that'd work in all places? except when process is available.

Or if there's a better solution, we could go with that

reactNativeDriver - Why is Root not wrapped with createElement?

reactNativeDriver() function in the current state is not mounting the app/running the application unless there is an initial emission on the stream to do the mounting of the app.

Is it because of missing createElement to be called on Root?
react-dom driver works fine because root was wrapped with createElement(Root) before mounting to container, while the react-native driver doesn't do it before registering component why?

AppRegistry.registerComponent(appKey, () => Root);

https://github.com/cyclejs/react-dom/blob/e1e5da8e998854344acdc117278e9c773ffecca3/src/index.ts#L10

André @staltz will it fix the react native app initial mounting problem? I don't know, I would like to learn.

ReactXP

I'm curious, any thoughts on ReactXP, which tries to bridge React Native and React (Web)?

More examples?

I'm new to Cycle.js.

What would this look like with more scenes?

outdated docs

I love the concept behind cyclejs, but it seems like the docs are out of date as the example is not working with the current RN deps. Also there seems to be few work done on the react-native driver overall.
Do you think this project will get more attention in the future?

Expo.io integration

Expo expects App function (that returns react native components) to be the default export. This is prevents the usage of makeReactNativeDriver function as usual.

keyboard driver and a more declarative RN.

Working with React Native, I find the most terrible thing that you don't have direct control of the keyboard.
It could be cool with a declarative Keyboard driver, where one could attach toolbar elements, etc. It would be hard to handle in pure React Native, since there is really only 'one' driver (the vdom). But Cycle's architecture could handle having a View driver, and a Keyboard driver. Further more it could be cool to have a more purely declarative View driver, something akin to snabdomm for native. Then we can't piggyback on React Native, but I honestly don't find RN declarative enough. I imagine making our own bindings would be quite an undertaking, but it seems the driver architecture of Cycle is much better suited abstraction for native development, especially because there are multiple views (virtual keyboard, vdom). Any input on these ideas?

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.