Problem with classes and state
See original GitHub issueTest case: https://codepen.io/daviuchoa/pen/jOWKNZX?editors=1010
Hello, I have a problem here, let’s see,
When I try to pass an object to reef component’s data (state) the object’s methods aren’t recognized.
It is always returning TypeError: "x" is not a function
. But if I try to use the “x” function outside the Reef component it works.
If I can help you to solve this you can send me a message. I’m available to for any kind of help
Thanks in advance, Reef is a nice lib.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Classes of problems
Classes of problems · Finite-state computation · Computable and uncomputable problems · Partially computable problems · Polynomial time and space · Relationships ...
Read more >Class conflict - Wikipedia
Class conflict, also referred to as class struggle and class warfare, is the political tension and economic antagonism that exists in society because...
Read more >Why am I seeing so many instantiable classes without state?
I'm seeing a lot of instantiable classes in the C++ and Java world that don't have any state. Some possibile reasons to create...
Read more >Topic 27 classes and objects, state and behavior
The point of classes is to combine state and behavior. – The draw behavior is closely related to a Point's data. – The...
Read more >The Trouble with Class | European Journal of Sociology ...
“Class” is a difficult concept. For one thing, it has a variety of meanings. Even ignoring its popular uses (as in “We are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hero
has nowhoIAm
property or argument. That’s a function in theIronMan
class.Yes and no.
Data that lives as part of a Reef component state gets converted into a Proxy, so if you’re using the component’s
data
property, that should be where the data actually lives.If you want, though, there’s no reason why you can’t use data from external objects/classes inside your
template
function. Don’t try to useprops
for them. Call them directly.You’ll lose out on reactivity this approach, though, and need to call the
render()
function explicitly.