Comments (2)
Hey @cray0000. I'm glad to see that people are enjoying my work :-) and thanks for the feedback. I've actually noticed these issues initially, but wasn't sure how I should go with the solution; but it was important for me to release a version asap.
Regards issue 1 - Your solution is pretty nice because it makes things much clearer. I would like to suggest another thing - import the view in the controller module and define the controller explicitly, like so:
import React from 'react'
import MyView from '../views/MyView'
class MyController extends React.Component {
render() {
return (
<MyView />
)
}
}
// Notice how we match the view to the controller
export default MyView.Controller = MyController
What do you think of that? It's less strict than the first solution and much more flexible but can potentially cause a poor architecture by the user.
For issue 2 - I don't think that using the socket of an af-el should be mandatory. Sometimes we would like to hide some elements based on the component's state, like a dropdown menu. Also, my thought was enabling the usage of af-el generated components across any React component, it shouldn't be bound to a specific view, so it can be reused, for example - a navbar. I agree that something feels a bit odd with this behavior, but I would like to make some more thinking around it to have a better solution. If you have an alternative to that, do share!
Eytan
from appfairy.
I'll think what to do with it. Thank you for brinign it to my attention. Closing as it gets old
from appfairy.
Related Issues (18)
- unable to inject af-el components HOT 8
- React-router warnings HOT 7
- Webflow to Gatsby - what do I do with webflow.js and jQuery? HOT 2
- Reusable components & content mapping
- appfairy_config.js not working HOT 3
- Interactions don't seem to work after appfairy migration HOT 2
- When using Appfairy, my whole page gets overwritten with the current date HOT 1
- Does appfairy work on Windows? HOT 3
- Can't resolve '..controllers/IndexController' in 'C:\path\appfairy\src\views'
- Column element from webflow doesn't display well
- TypeError: factory is not a function HOT 2
- Unhandled Rejection (ReferenceError): Stats is not defined HOT 1
- Css not working
- Compilation warnings HOT 16
- Files missing/Error when using appfairy command HOT 6
- Interactions and observers not working with appfairy HOT 9
- None of the transform animations are working when using appfairy 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 appfairy.