Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
const initialData: UserData = {id: '123', firstname: 'First Name', lastname: 'Last Name'}; export const user = readable(initialData, (set) => { const userApiInterval = setInterval(() => { fetch('https://randomuser.me/api/').then((data) => data.json()).then((user) => { const {first, last } = user.results[0].name; const {value} = user.results[0].id; const newUser: UserData = { id: value, firstname: first, lastname: last } set(newUser); }).catch((ex) => { set(null); }) }, 5000); return () => clearInterval(userApiInterval) })