Comments (11)
@brigand - I'm sorry for the late response. I do agree with you and think that you're onto something - I like the idea of a transpilation step to convert your Angular view into a React component. That would eliminate any sort of transclusion and would probably be much easier to work with than trying to do the parsing at runtime.
ngReactRepeat will, however, be deprecated when https://github.com/davidchang/ngReact/tree/kasperp-angular-react-rebase is merged into master (and we release something like an 0.1.0.
Are you interested in the possibility of working on conversions from Angular views to React components?
from ngreact.
Awesome, yeah. Any tips on the last paragraph of my original comment?
Something like this for the api maybe. It'd let people use React's render, without even learning React.
<react-render>
<div>hey {{someAngularExpression}}</div>
<div ng-class="..." ng-repeat="x in xs">{{x.name}}</div>
</react-render>
Any number of these bindings could be implemented, so I guess it's just deciding which are most important. I think these:
- ng-repeat
{{expression}}
- ng-if
- ng-show
- ng-hide
- ng-class
And additionally support {{expression}}
in other attributes.
from ngreact.
I came here to see if anyone was doing this yet. I think its a great idea. Has any progress been made?
from ngreact.
I would love to see this as well. Would be happy to contribute if you guys steer me along the path you were thinking. Or even implement one of the attributes such as ng-class.. Would be happy to help tackle some of the others
from ngreact.
@lylepratt, @djett41 sorry for the late response. I don't believe there has been any progress made on this idea yet.
I think it is an interesting idea. For transitioning angular apps to react app would it also be useful to allow other react components inside react-render
? like
<react-render>
<div>hey {{someAngularExpression}}</div>
<div ng-class="..." ng-repeat="x in xs">
<component x={x}/>
</div>
</react-render>
@davidchang have you given this any more thought ?
from ngreact.
I'm also interested in this idea since using the ReactJS virtual DOM will greatly speedup ng-repeat. If there is anyway I can help please let me know.
from ngreact.
Those snippets look awesome. I need to "port" an Angular template into a React component for performance and the main pain-points seem to be replacing ngRepeat
, ngIf
, ngShow
/ngHide
and ngClass
. Having the ability to wrap all the template into <react-render>
tags and getting React performance auto-magically sounds exciting and very promising! Would be happy to make small contributions as time permits.
from ngreact.
Does anyone know how to intercept angular's processing of a directive's children? That's what's blocking here; I need the dom untouched.
And to clarify, I can't think of a sane way to do this AOT, it needs to be done at run time.
from ngreact.
@brigand are you searching for terminal
on $compile service?
https://docs.angularjs.org/api/ng/service/$compile
from ngreact.
I think the approach to accomplishing this should be very similar to how the Famo.us Angular integration works. Links to Famo.us surfaces implemented as Angular directives:
https://github.com/Famous/famous-angular/tree/master/src/scripts/directives
For example, the fa-surface
directive:
https://github.com/Famous/famous-angular/blob/master/src/scripts/directives/fa-surface.js
from ngreact.
I was thinking about closing this issue, as:
- The discussion seems to have gotten stale
- What is being discussed here (although interesting) seems to be outside of what ngReact is
Any strong opinions before I do so ?
from ngreact.
Related Issues (20)
- CHANGES.md missing 0.5.0 release HOT 2
- react/react.js and react-dom.js are missing from bower folder HOT 1
- Property name normalization
- Failed prop type errors
- How to fix these warnings HOT 1
- JSXTransformer is not present in bower components after installing ngReact HOT 3
- Component is re-rendered on every prop change on the angular side HOT 1
- How to use a static value as props? HOT 1
- ngReact causes react-transition-group to misbehave
- Any thoughts on how to handle props that are not passed HOT 1
- property name case matters (in html template) HOT 3
- make reactDirective composable (feature)
- Event propagation order
- Does it work with Angular version > 2? HOT 1
- Lexer error when using special character in props
- Subscribing angular events in react components
- Current project status HOT 1
- Cannot read property 'render' of undefined HOT 1
- React Object component support HOT 2
- Support for React Hooks HOT 2
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 ngreact.