Giter Site home page Giter Site logo

Comments (13)

ericclemmons avatar ericclemmons commented on August 14, 2024

Absolutely! I'm rewriting this to be a HoC (much like we've been seeing since React Conf), and now that React Native has been open-sourced since F8, testing this should be possible.

Would you mind if I requested your help on the React Native part?

from react-resolver.

iamdustan avatar iamdustan commented on August 14, 2024

I’d be happy to. Help come up with a list or pointers on what will need to be resolved (if anything) between the implementations and I’ll throw some weight at it.

from react-resolver.

ericclemmons avatar ericclemmons commented on August 14, 2024

Will do! Once this next version is released, we can do a patch for React Native support, since it's the bomb-diggity.

from react-resolver.

iamdustan avatar iamdustan commented on August 14, 2024

👍 looking forward to it. I’ve just been doing npm install --force to use this with react 0.13 (and falling back to React.createClass where I need to) 😄

from react-resolver.

ericclemmons avatar ericclemmons commented on August 14, 2024

@iamdustan Wanna take a stab @ seeing what this does within React Native? :)

from react-resolver.

iamdustan avatar iamdustan commented on August 14, 2024

Sure do! I’ll hopefully get to this tomorrow or over the weekend.

from react-resolver.

iamdustan avatar iamdustan commented on August 14, 2024

Initial status: react-native’s haste module system/dependency graph seems to be failing for me.

[11:44:07] <START> find dependencies
Error: Cannot find package main file for package: /NativeWithResolverExperiment/node_modules/react-native/node_modules/react-tools/src
    at DependecyGraph.resolveDependency (/NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.j
    at /NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js:122:22
    at Array.forEach (native)
    at collect (/NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js:120:25)
    at /NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js:135:9
    at Array.forEach (native)
    at collect (/NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js:120:25)
    at /NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js:135:9
    at Array.forEach (native)
    at collect (/NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/index.js:120:25)
    at DependecyGraph.getOrderedDependencies (/NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/DependencyGraph/in
    at /NativeWithResolverExperiment/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/index.js:91:35
    at tryCatcher (/NativeWithResolverExperiment/node_modules/react-native/node_modules/bluebird/js/main/util.js:24:31)
    at Promise._settlePromiseFromHandler (/NativeWithResolverExperiment/node_modules/react-native/node_modules/bluebird/js/main/promise.js:454:31)
    at Promise._settlePromiseAt (/NativeWithResolverExperiment/node_modules/react-native/node_modules/bluebird/js/main/promise.js:530:18)
    at Async._drainQueue (/NativeWithResolverExperiment/node_modules/react-native/node_modules/bluebird/js/main/async.js:180:12)
    at Async._drainQueues (/NativeWithResolverExperiment/node_modules/react-native/node_modules/bluebird/js/main/async.js:185:10)
    at Async.drainQueues (/NativeWithResolverExperiment/node_modules/react-native/node_modules/bluebird/js/main/async.js:15:14)

from react-resolver.

ericclemmons avatar ericclemmons commented on August 14, 2024

React Tools? I wonder if that's related to the need for react/addons causing issues in #27:

#27 (comment)

from react-resolver.

ericclemmons avatar ericclemmons commented on August 14, 2024

I know it's poor taste to close issues just to re-create them in the future, but the React landscape has changed quite a bit & I'm not sure that React Native fits well with this project.

If it does fit well, then I'll re-address post v2.

from react-resolver.

jbreemhaar avatar jbreemhaar commented on August 14, 2024

I know this issue is old but you might find it interesting:
I'm currently using/protyping react-resolver in react-native with 3 small changes in the source (removed the window reference, renderToStaticMarkup and the static render in Resolver).

All my resolver code written for web (and lots of components) pretty much works instantly on react-native. Awesome.

from react-resolver.

ericclemmons avatar ericclemmons commented on August 14, 2024

@jeroentradecast Re-opening because you were able to get it to work.

Would you be able to supply a bit of a diff or a PR for these changes?

I've honestly never ran React Native, so I don't have a clue where to begin :)

I imagine if we were to publish, there'd be a react-resolver/native export that would fix these signatures.

from react-resolver.

jbreemhaar avatar jbreemhaar commented on August 14, 2024

@ericclemmons

I don't think I'll have enough time in the coming two weeks (almost vacation yay) to write out a complete PR for this feature but I've written some pseudo PR you could have a look at. #130.

edit. The problem I currently have is the import of react-dom/server, it'll try to resolve node modules (stream).

from react-resolver.

ericclemmons avatar ericclemmons commented on August 14, 2024

@jeroentradecast Thanks for #130, and no worries. Enjoy your vacation :)

The changes look minimal. I think I'll take #130 and finally create a react-native example to test it out.

from react-resolver.

Related Issues (20)

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.