-
-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for voc #14
Support for voc #14
Conversation
src/utils/ExportUtil.ts
Outdated
|
||
export class ExportUtil { | ||
public static getProjectName(): string { | ||
return store.getState().editor.projectName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ja bym czegoś takiego użył:
https://www.npmjs.com/package/xml-escape
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i w sumie fajnie że to robisz... ale imho do reducera powinno pójść już elegancko wyESCAPEowana wartość... czyli to sanitizowanie powinno być na onChange albo onBlur
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
albo przy wykonywaniu akcji
src/utils/ExportUtil.ts
Outdated
@@ -0,0 +1,14 @@ | |||
import {store} from ".."; | |||
|
|||
export class ExportUtil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w Reduxie jest taka konwencja, że takie obiekty jak ten, nazywają się SELECTORAMI,
czyli w Twoim przypadku byłby to jakiś selector np: EditorSelector.ts (ponieważ pobierasz dane z reducera "editor")
i ma w sobie taką samą metodę jak teraz masz... czyli zmień tylko nazwę na "EditorSelector.ts"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generalnie poczytaj o selektorach
No description provided.