You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The requirement of the project is to separate DOM from logic in different files.
Thus, I have these files:
default.js
import { submitForm } from './logic'
function displayTaskForm(key) {
// function create form HTML content with btn submit.
submitForm(addTaskbtn, key);
return form;
}
export { displayTable };
logic.js
import { displayTable } from './default';
const submitForm = (btn, key) => {
// Adds event listener to add input to the table && local storage
displayTable(key) // shows the table content including recent input
return btn;
}
export { submitForm };
Could you advise how I could solve this issue? the problem is I have to split my DOM from the logic part. I don't see a way to link creating DOM based on if statement results.
The requirement of the project is to separate DOM from logic in different files.
Thus, I have these files:
default.js
logic.js
And I have these errors:
default.js
1:1 error Dependency cycle detected import/no-cycle
logic.js
1:1 error Dependency cycle detected import/no-cycle
Could you advise how I could solve this issue? the problem is I have to split my DOM from the logic part. I don't see a way to link creating DOM based on if statement results.
Here is the original repository link
The text was updated successfully, but these errors were encountered: