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
We're currently bundling some of the source for React NodeGUI in src/dom/react-nodegui, rather than just importing build files from node_modules/react-nodegui.
There was a compelling reason for this, but unfortunately I've forgotten.
To implement RNObject src/dom/svelte/RNObject.ts, a basic DOM-conforming wrapper for all native elements (QObjects) that is not necessarily a visual element. e.g. we use it for the <head>, <style> and <template> elements as well as document, all found in src/dom/svelte. It's also referenced in src/dom/svelte-elements.ts, where each of those elements are registered.
I think the reason for copying the source in may have simply been to avoid any coupling with the React side of React NodeGUI. For example, we need to reference src/dom/react-nodegui/src/components/config.ts, but that file in its original state imports from "react-reconciler". I wanted to avoid users having to install react-reconciler into their app bundle. I therefore decoupled that file from "react-reconciler" in this commit: 2acccb1#diff-1fecc56b01094743ee99d3d1c501a51a25634e2faeeb1a8aafbdc44bd7514263. I'm not sure I've made any other changes to the library otherwise (and have been careful not to, as it would make updates harder to manage).
I also recall that I had problems importing the built code, due to a mismatch between esm and commonjs modules.
The text was updated successfully, but these errors were encountered:
I've now decoupled the React NodeGUI sources from React. Ideally React NodeGUI itself would make similar changes in kind so that we could just import it directly.
We're currently bundling some of the source for React NodeGUI in src/dom/react-nodegui, rather than just importing build files from
node_modules/react-nodegui
.There was a compelling reason for this, but unfortunately I've forgotten.
We use React NodeGUI in a few places:
<head>
,<style>
and<template>
elements as well asdocument
, all found in src/dom/svelte. It's also referenced in src/dom/svelte-elements.ts, where each of those elements are registered.RNWindow
typing.I think the reason for copying the source in may have simply been to avoid any coupling with the React side of React NodeGUI. For example, we need to reference src/dom/react-nodegui/src/components/config.ts, but that file in its original state imports from
"react-reconciler"
. I wanted to avoid users having to installreact-reconciler
into their app bundle. I therefore decoupled that file from "react-reconciler" in this commit: 2acccb1#diff-1fecc56b01094743ee99d3d1c501a51a25634e2faeeb1a8aafbdc44bd7514263. I'm not sure I've made any other changes to the library otherwise (and have been careful not to, as it would make updates harder to manage).I also recall that I had problems importing the built code, due to a mismatch between esm and commonjs modules.
The text was updated successfully, but these errors were encountered: