Г
Size: a a a
Г
Г
Г
Г
Г
AB
АЧ
DT
DZ
v
Г
Г
A
import { EditorState } from 'draft-js'
import { Editor } from 'react-draft-wysiwyg'
…
const [editorState, setEditorState] = useState(EditorState.createEmpty())
…
<Editor
editorState={editorState}
onEditorStateChange={setEditorState} />
Warning: Can't call setState on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to this.state directly or define a state = {}; class property with the desired state in the r component.
Чт
о посоветуете делать? Можно тупо игнорить этот варн или я могу как-то это исправить?ДУ
BB
const Messaging = {};b.js
Messaging.MyFunc = function() { console.log('test'); }
export default Messaging;
async function load_and_run() {В браузере получаю сообщение:
let {default: Messaging} = await import('a.js');
Messaging.MyFunc();
}
$(function() {load_and_run()})
Uncaught (in promise) TypeError: Cannot read property 'MyFunc' of undefinedгде я дурак?
ДУ
j
function convert (emojiString, alias) {
let key = 'custom'
let value = ''
for (let i = 0; i < emojiString.length; i++) {
const code = emojiString[i].codePointAt(0).toString(16).padStart(4, 0)
key += '-' + code
value += '\\u' + code.toUpperCase()
}
console.log(`"${key}":[["${value}"],"","",["${alias}"]],`)
}
convert("#️⃣", 'myEmoji1')
j
ei