Closed mietekrmd closed 10 months ago
Hello @mietekrmd, thank you for reaching out. Been taking a look at the (forked) repository you mentioned, following changes can be used in these files:
misc\window\components\Titlebar.jsx
Replace :
const activeMenuIndex = useRef<number | null>(null);
with:
const activeMenuIndex = useRef(null);
misc\window\components\WindowFrame.jsx
Replace :
const itsRef = useRef<HTMLDivElement>(null);
With:
const itsRef = useRef(null);
misc\window\titlebarContextApi.js
Remove unnecessary import:
import { TitlebarContextApi } from './titlebarContext.js';
tools\webpack\webpack.plugins.js
Remove unnecessary plugin import & declaration:
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
new ForkTsCheckerWebpackPlugin(),
Thank you for noticing those incorrect lines, as I wasn't able to myself.
You're welcome! With using "javascript only" approach to convert most parts of this project, you're already done well 👍🏻
Have a nice Christmas Eve!
Also, there is already a repo for javascript version based on this project if someone needs: https://github.com/codesbiome/electron-react-webpack-boilerplate
Have a wonderful Christmas Eve as well!
Also, there is already a repo for javascript version based on this project if someone needs: https://github.com/codesbiome/electron-react-webpack-boilerplate
I didn't notice earlier. In any case, thanks to your suggestions, everything is now working properly on my end.
It seems to me that I have done everything necessary to remove TypeScript from the project and replace it with JavaScript. I changed .tsx to .jsx, .ts to .js, converted the components' syntax from TypeScript to JavaScript, added babel-loader, and included the appropriate rule in webpack for loading .js and .jsx files, but something is still not working. Could you take a look at it?
My repo link: https://github.com/mietekrmd/electron-js
Errors below: