반응형

const a = arg||'default' 주로 이렇게 초기화용도로 쓰는데 0, ''도 정상값일 경우는 ??를 쓰면 됨

 

Nullish coalescing operator

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing

 

Logical or operator

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR

 

 

반응형
반응형

style={{width: n.position?.width||'100%'}} 로 구지 안해도 style={{width: n.position?.width}} 만 하면 됨, n.position이 null이면 n.position?.width는 undefined가 되므로

반응형
반응형

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at editorwatchdog.js:179:1
    at async u._initializeEditor (index.js:5:4518)
    at async u.componentDidMount (index.js:5:3736) {phase: 'initialization', willEditorRestart: false}phase: "initialization"willEditorRestart: false[[Prototype]]: Object
(anonymous) @ index.js:5
Promise.catch (async)
_initializeEditor @ index.js:5
await in _initializeEditor (async)
componentDidMount @ index.js:5
commitLayoutEffectOnFiber @ react-dohttp://m.development.js:23349
commitLayoutMountEffects_complete @ react-dohttp://m.development.js:24727
commitLayoutEffects_begin @ react-dohttp://m.development.js:24713
commitLayoutEffects_begin @ react-dohttp://m.development.js:24695
commitLayoutEffects @ react-dohttp://m.development.js:24651
commitRootImpl @ react-dohttp://m.development.js:26862
commitRoot @ react-dohttp://m.development.js:26721
performSyncWorkOnRoot @ react-dohttp://m.development.js:26156
flushSyncCallbacks @ react-dohttp://m.development.js:12042
(anonymous) @ react-dohttp://m.development.js:25690
Show 13 more frames
Show less

 

 

Cannot read properties of null (reading 'model') TypeError: Cannot read properties of null (reading 'model') at http://localhost:3000/app.2d361dd0ad882d7da2b1.min.js:289211:20

 

 

 

https://github.com/ckeditor/ckeditor5-react/issues/442

 

TypeError: Cannot read properties of null (reading 'model') · Issue #442 · ckeditor/ckeditor5-react

I'm trying to implement CKEditor 5 to my Nextjs project using this guide: https://ckeditor.com/docs/ckeditor5/latest/installation/integrations/next-js.html However when I try to run the webpage sho...

github.com

 

반응형
반응형

import { parse } from "node-html-parser";
dangerouslySetInnerHTML={{ __html: parse(n.content)?.toString() }} 원래 소스에는 parse를 적용했는데 안해도 나왔음

반응형
반응형

react-dom.development.js:86 Warning: A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components

 

 

react-dom.development.js:86 Warning: `value` prop on `input` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.

반응형
반응형

서버에 올리면 onLoad, onError event 둘다 안탈때가 있음 왜그런지는?

반응형
반응형

반응형
반응형

 

<label class="required">Name:</label>
<input type="text">

<style>
  .required:after {
    content:" *";
    color: red;
  }
</style>

https://stackoverflow.com/questions/11197671/use-css-to-automatically-add-required-field-asterisk-to-form-inputs

반응형
반응형

 

{route.path === "/board/viewimage" && (
              <>
                <meta name="viewport" content="initial-scale=1,width=device-width,user-scalable=1" />
              </>
            )}

반응형
반응형

반응형

+ Recent posts