Comments (13)
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.
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.
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.
👍 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.
@iamdustan Wanna take a stab @ seeing what this does within React Native? :)
from react-resolver.
Sure do! I’ll hopefully get to this tomorrow or over the weekend.
from react-resolver.
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.
React Tools? I wonder if that's related to the need for react/addons
causing issues in #27:
from react-resolver.
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.
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.
@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.
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.
@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)
- React.renderToStaticMarkup -> ReactDOMServer.renderToStaticMarkup HOT 2
- Can I use this without server rendering? HOT 3
- Add ability to cache resolved props HOT 9
- Using HOC breaks HMR
- Minimum universal react API HOT 1
- test
- Support variable? HOT 3
- Unhandled rejections server side HOT 1
- @context steals data from this.context HOT 6
- Allow factory to decide which props to re-use? HOT 5
- Documentation links are broken HOT 4
- Using same component on different routes HOT 3
- Using @client and @resolve on the same class causes @resolve to be called twice HOT 1
- Some way of manipulating data before passing it to component HOT 2
- Breakage with React 16: PropTypes no longer exported by React HOT 1
- "[email protected]" has incorrect peer dependency "react@^0.14.6 || ^15.0.0-0" HOT 5
- Need hydrate static method in the Resolver class for server side rendering HOT 2
- Fix compatibility with Babel 6
- Resolve multiple props with one callback HOT 5
- Initial Data from Django using React Resolver HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-resolver.