React14 [Apollo/GraphQL] makeVar로 상태 전역 관리하기 makeVar() Apollo Client3에서 부터 본격적으로 makeVar()를 통해 상태관리를 전역적으로 할 수 있게해줍니다. 캐시와 분리되어 있기 때문에 모든 유형 및 데이터 구조를 저장할 수 있습니다. import {InMemoryCache, makeVar} from '@apollo/client'; ... export const isTwoFactoryVar = makeVar({type: 'CHECK', open: false}); ... export const cache = new InMemoryCache({ typePolicies: { Query: { fields: { ... isTwoFactory, ... } } } })사용하기 import {isTwoFactory.. 2021. 4. 29. [React] Element UI 체크박스 적용 onChange에서 매개변수로 의 name값을 받게 되어있는데, 에 name속성을 사용하니까 빨간줄이 생기면서 에러 출력... No overload matches this call. index.d.ts 파일을 까보니까 name이 없었다... 프레임워크 UI가 이럴수가 있구나...ㅎ 더보기를 열면 주석해놓은 name 부분이 없어서 추가한 것. 더보기 // Checkbox interface CheckboxProps extends ElementReactLibs.ComponentProps { label?: string trueLabel?: string | number falseLabel?: string | number disabled?: boolean checked?: boolean // name?: strin.. 2021. 3. 24. 이전 1 2 3 4 다음