Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
// json data example | |
// can be pulled from api or other source as needed | |
let homes = [ | |
{ | |
"h_id": "3", | |
"city": "Dallas", | |
"state": "TX", | |
"zip": "75201", | |
"price": "162500" | |
}, { |
// example of stateless functional component using useState hooks | |
// example of multi use handleChange function implemented with hooks | |
const StatelessHandleChange = () => { | |
const [scheduleData, setScheduleData] = useState({ | |
firstName: '', | |
lastName: '', | |
dob: '', | |
payer: '', |
The following is a quick guide on how to format json data into ndjson and import the resulting data into sanity studio using the sanity cli.
Sanity is a structured content platform that is incredibly fast and flexible.
NDJSON is a convenient format for storing or streaming structured data that may be processed one record at a time.
function removeDuplicateObjectFromArray(array, key) { | |
return array.filter((obj, index, self) => | |
index === self.findIndex((el) => ( | |
el[key] === obj[key] | |
)) | |
) | |
} | |
const data = arr.reduce((filter, current) => { | |
const dk = filter.find(item => item.value === current.value); |
import React, { useState, useCallback } from 'react'; | |
import { | |
Button, | |
Flex, | |
Dialog, | |
Grid, | |
Card, | |
Text, | |
Box, | |
TextInput |