amark on master
subscribe only on backpropagati… Merge branch 'master' of http:/… PANIC 4: AXE get subscriptions (compare)
amark on master
Panic tests for rod & radix.js … (compare)
amark on master
reduce not-found acks if via/re… test undo tmp (compare)
npm install gun && cd node_modules/gun && npm start
gun.on('hi', function...
and 'byte'
not connected/disconnect.*
taking higher precedence?gun/gun.js
(don't build it). If React Native, see https://github.com/aethiop/jot tutorial.express.use(Gun.serve)
or express.use(Gun.serve(someDirectoryToServe))
?
hey guys quick question, is there a way to "construct" the subproperties of a chain just one level deep before returning it?
for example:
{
"name": "foo",
"address": {
"city": "bar",
"street": {
// unneeded data
}
}
}
here, i'd like to access just the name
and address.city
i thought about using load()
, but i don't really need to access all the subproperties
or will i have to do separate get()
calls to achieve this?
tldr: is there a way to include the resolution of subproperties when using on()
or once()
on a document?
Is there a full text search example? Like, how do I search for let’s say post’s descriptions that include the word ‘test’? Especially if the searching peer does not have all the posts currently available in it’s database.
Is there a way to tell the network “hey does anybody has X” and retrieve only the search results, but not an entire posts set? I’m okay if some kind of indexing setup is needed, since O(n) for this isn’t very nice...
get({ ".": { "*": e.target.value } })
don't you subscribe to an entire peer?
{ ".": { "*": e.target.value } }
part? I can't see anything in docs mentioning that you can use something other than a string as a key to get
.
label
Object of GUN nodes is for? Is there documentation for it?
@draeder @rococtz:matrix.org @bmatusiak @Manwe-777 @ilhamgum @amark @lexi:matrix.org
I have this basic structure for the database for emails but I'm sure there is something wrong
I create 613 converID Node at conversations Node, and at the user Inbox node i but the 613 references for the converID nodes
when I tried to retrieve these 613 conversations with the subject and body property, it takes more than 63 sec
I first get the hole refPath for all converId nodes at Inbox node using gun.get("accounts").get(user).get("inbox").once( async (data)=>{
after that
i loop through each ref-path and retrive the converId property
gun.get("conversations").get(converID ref-path).once( async (data)=>{
}
i feel there is something wrong , 613 records takes 63 sec ??
i also try
gun.get("accounts").get(user).get("inbox").map().once( async (data)=>{
and store data in react state and show it
}
it takes more than 111 sec !!
gun.get('app-name').get('users').get(username).put(age)
gun.user().get('root-node').put(data)
gun.get('app-name').get('users').get(username).on(data => console.log(data))
@draeder @rococtz:matrix.org @bmatusiak @Manwe-777 @ilhamgum @amark @lexi:matrix.org
I have this query
const oneTimeArray = [] ;
gun.get("emails").map().once( (data)=>{
** it will return 613 records as objects for example { subject : data.subject , body : data.body }
what is the best way to render it using react ?
i try to use
1 - setEmails(prev = > [...prev , { subject : data.subject , body : data.body } ] but this make the performance so bad and the query need 1 sec to retrive data , after using setState it's take 100 sec for retrive and render the data
}
2- I tried to store the whole data in one array and then after that render it one time, like
oneTimeArray.push({ subject : data.subject , body : data.body } )
}
and after gun statement i tried to catch the array and it's keep give empty array , any ideas?
// This outside React, at index.jsx
window.gunData = {};
// This elsewhere, try to not use useEffect !
gun.get("emails").on( (data)=>{
// key could be some id inside data, or just replace the entire object
window.gunData[key] = data;
})