a d
08/02/2021, 12:32 PMDharmaraJ
08/02/2021, 12:37 PMDharmaraJ
08/02/2021, 12:38 PMDharmaraJ
08/02/2021, 12:39 PMDharmaraJ
08/02/2021, 12:39 PMsession()
and not user()
DharmaraJ
08/02/2021, 12:39 PMjs
const accessToken = auth.session().access_token
nooki
08/02/2021, 2:21 PMBenanna19
08/02/2021, 3:25 PMmischkez
08/02/2021, 3:31 PMrafaelh
08/02/2021, 3:39 PMDharmaraJ
08/02/2021, 4:25 PMDharmaraJ
08/02/2021, 4:25 PMDharmaraJ
08/02/2021, 4:25 PMaliparpar
08/02/2021, 4:42 PMaliparpar
08/02/2021, 4:42 PMbabayaga
08/02/2021, 4:52 PMeverconfusedguy
08/02/2021, 5:17 PMBash
08/02/2021, 6:08 PMnicholaschiang
08/02/2021, 6:26 PMjavascript
const { data, error } = await supabase.from('users').select().neq('times', []);
But that โ๏ธ doesn't seem to work (data
is always empty).nicholaschiang
08/02/2021, 6:53 PMtettvy
08/02/2021, 6:59 PMburggraf
08/02/2021, 6:59 PMFlyken
08/02/2021, 7:10 PMFlyken
08/02/2021, 7:10 PM_app.js
but still getting thisFlyken
08/02/2021, 7:11 PMnicholaschiang
08/02/2021, 7:14 PMDate
objects stored as timestamptz
in Supabase turned back into Date
objects when queried?
It seems like they're always going to be ISO strings (JSON-ified by Postgrest). Is that correct? That seems like a bad API surface for your SDK IMO...Olyno
08/02/2021, 7:51 PMOlyno
08/02/2021, 7:53 PMThisIsJustin
08/02/2021, 8:03 PMJasper
08/02/2021, 8:08 PMjsx
const [todos, setTodos] = useState([])
useEffect(() => {
supabase.from("todos").select().then(res => {
const list = [];
for (let todo of res.data) {
list.push(todo)
}
setTodos(list)
})
supabase.from("todos")
.on("UPDATE", payload => {
console.log(todos)
})
.subscribe(payload => {
console.log('schema ', payload)
})
}, [])
Hello, i'm trying to use the realtime database in react, but in the callback my local state is a empty array.