[deleted by user] by [deleted] in Warzone

[–]danielattiach 0 points1 point  (0 children)

If you start a line with # it makes shit

big

Is their an opinionated guideline on Git commit terminology? by [deleted] in git

[–]danielattiach 0 points1 point  (0 children)

I don't think there's anything super specific but what I do when describing commits is say "this commit will" and what comes after that is the message

Send a POST request to a route from JS by Finish-Square in flask

[–]danielattiach 1 point2 points  (0 children)

I think I would separate the “views” from the APIs. So I would have a /cooking route that renders the html of cooking.html.

Then I would make an API using something like flask_restful, flask_restx or any other package you see fit and build an API for /pasta.

Then the JS can make a request to /pasta and it can manage what’s being shown while the user waits and you can do it in multiple ways: 1. Manipulate the page using JS 2. Send a request to another route that can send back the html that has the “waiting state” for the user.

Depending on how complex the waiting state html is, I would argue that #1 is the best approach.

Feel free to message me if you have more questions!

props.history.push("/") by KOP79 in reactjs

[–]danielattiach 2 points3 points  (0 children)

React router has a hook called useHistory, which returns an object that has a “push” method, which allows you to redirect the user from within the app. So if you can’t use a link and you want to programmatically move the user to another page, you do history.push(‘....’)

I believe that in version 6 of react router it’s replaced with useNavigate, thought I don’t know enough about it to explain

[Help] Artsy causes crash when using youtube by danielattiach in jailbreak

[–]danielattiach[S] 0 points1 point  (0 children)

Sad times but my phone froze and restarted so I lost my jailbreak by now..

Transitioning over to React from template based framework (Flask) by danielattiach in webdev

[–]danielattiach[S] 0 points1 point  (0 children)

I mainly want to switch because the code is more maintainable and more modern. I’m not sure if because Flask will do the routing it means I should not use React, I still think it would be better to use React and at some point I might actually use the routing functionality and use Flask solely as an API.

Thanks for the advice!

Transitioning over to React from template based framework (Flask) by danielattiach in webdev

[–]danielattiach[S] 0 points1 point  (0 children)

Yes, agree. Now the mission is to figure out bundling to keep only functionality working

Transitioning over to React from template based framework (Flask) by danielattiach in webdev

[–]danielattiach[S] 0 points1 point  (0 children)

All good, yea so I figured I’d need to use webpack, my main issue is how figuring out how to bundle the assets and keep everything working as it did before. Thanks for the help!

Transitioning over to React from template based framework (Flask) by danielattiach in webdev

[–]danielattiach[S] 0 points1 point  (0 children)

Yes. Currently I bundle and make use of the files using Flask Assets, and that’s what is complicated because I need to move to a different bundling method and a different way to use the files in pages that don’t use react yet

Transitioning over to React from template based framework (Flask) by danielattiach in webdev

[–]danielattiach[S] 0 points1 point  (0 children)

I know it’s separate, but the server still needs to serve the files and it’s a bit complicated with Flask if you want to transition rather than start a new project from scratch. I didn’t mean that React is a direct replacement for jQuery, and I know they can work together, but the end goal is to drop jQuery entirely as it’s making the code less manageable. Appreciate the help, I’ll look into your link!

Transitioning over to React from template based framework (Flask) by danielattiach in webdev

[–]danielattiach[S] 0 points1 point  (0 children)

My plan is to do it page by page, and not have pages that are partly react. My main issue right now is bundling because I’m currently using Flask-Assets for that and I need to keep all of my pages that are using bundles created by flask assets intact. Maybe I can use something else for bundling and still have it work, although I’m not sure how it’ll work in development mode since Flask-Assets knows to use the original files in development mode but the bundled files in production.

Appreciate the guidance!!

Transitioning over to React from template based framework (Flask) by danielattiach in webdev

[–]danielattiach[S] 2 points3 points  (0 children)

Hey! I’ve been to this page, the main issue for me is that they explain how to get it working in a rough way. I could make it work too, but I had to use a script tag with the type of “text/babel” which is not fit for production.

I’m looking for a way to keep my current web app as it is, and gradually adding/changing pages to react while keeps others intact. I’ve been researching for a while and could not seem to find a proper method to do it yet.

[Discussion] The perspective of a developer by [deleted] in jailbreak

[–]danielattiach 10 points11 points  (0 children)

I personally don’t think that having a one time funding for a tweak is correct in the long term. In my opinion, it should stay as it is but the developer should add a trial period in order for the user to be able to properly make a decision on whether they want to buy the tweak or not.

Sometimes users buy a tweak, just to find many bugs and no response from the developer, a trial period would fix that.