Due to Next.js’s high variety of functionality, it can take the place of multiple packages. However, this comes with trade-offs:
Fullstack Monolith (Rails + React):
Ruby on Rails is often viewed as an opinionated framework, where everything tends to work together in a “monolithic” style. For many startups, this simplicity is highly attractive. If you’re just getting started and want to reduce initial overhead, React on Rails could be a great choice because Rails handles both the backend and the front end in one place, which minimizes setup complexity. Plus, Rails has a ton of built-in functionality like database migrations, authentication, and routing, so you don’t have to reinvent the wheel.
Separation of Frontend & Backend (Next.js + backend framework):
With Next.js, you get more flexibility. It naturally facilitates a separation between the front-end (React) and back-end (Node.js, APIs, or any backend solution). This could mean developing and scaling each part of the stack independently. This architectural decision has its pros and cons: on the one hand, it gives you more flexibility in terms of backend technologies and scaling; on the other hand, it may add more complexity in terms of communication between the front-end and back-end, API management, and deployment.
One of the standout features of Next.js in recent versions is its use of SWC (Speedy Web Compiler), a Rust-based compiler designed to be faster and more efficient than Babel. SWC handles tasks like JavaScript/TypeScript transpiling and minification, and it is tightly integrated into Next.js to improve build performance significantly. Next.js also supports Turbopack as an experimental feature, which might make it an attractive option for developers looking for cutting-edge bundling and fast HMR (hot module replacement) during development.
The React on Rails tech stack has also made significant performance improvements by adding support for SWC and esbuild loaders as an alternative to Babel for JavaScript/TypeScript transpiling. This enables users to utilize Webpack’s vast ecosystem of plugins, loaders, and configuration options that have been fine-tuned over the years and still enjoy the latest in Javascript compilation performance. This, in combination with ReactOnRails’ recent implementation of React Server Components, places the ReactOnRails/Shakapacker tech stack close behind, if not alongside, Next.js in terms of performance.
Side Note: While certainly not the first trade-off to come to mind, I’d be remiss not to mention that Next.js is heavily optimized to work with Vercel web-hosting, offering features like automatic serverless deployment, edge caching, and built-in CI/CD pipelines. On the flip side, deploying Next.js elsewhere (e.g., on AWS, DigitalOcean, or your own infrastructure) might require more setup and manual configuration.
The decision between Next.js and React on Rails largely depends on which framework is your primary focus:
If you know that you want to use React, but are not committed to a particular backend framework, then Next.js is an excellent option for a frontend, as it can be used in combination with any backend framework or even as a monolith with its Server Actions.
If you know that you want to use Ruby on Rails for your backend, then Shakapacker with ReactOnRails or maybe even Vue might be your preferred option for some of the reasons stated above.
In either case, Shakacode offers years of experience in setup and customization for both these frameworks, in a cost-transparent & negotiable package!
]]>irb(main):019> output = system('/usr/local/bundle/bin/cpl help') irb(main):020> puts output /usr/local/bundle/gems/bundler-2.3.22/lib/bundler/rubygems_integration.rb:308:in `block in replace_bin_path': can't find executable cpl for gem cpl. cpl is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)
gem install cplAI provided an excellent answer:
It seems like you’re trying to run a command that is not part of your current bundle. Bundler is trying to find the cpl command in the gems specified in your Gemfile, but it’s not there.
One way to run commands that are not part of your bundle is to use Bundler.with_unbundled_env or Bundler.with_clean_env (depending on your Bundler version). This will temporarily clean your environment of bundler settings while running the block.
Here’s how you can do it:
Bundler.with_unbundled_env do
output = system('/usr/local/bundle/bin/cpl help')
puts output
end
This will run the cpl help command in an environment where Bundler has not modified any variables, allowing the system to find the cpl command in its usual places.
The documentation and examples are in the source repo. And you have a Slack channel for these questions.
What is your company? Let’s talk directly.
]]>Where does this secret “complete setup using this technique” exist? Is it just built in and doesn’t really explain how to use it? Any insights would be appreciated, since I can’t seem to parse it and the docs seem to not be updated on this topic.
]]>What I am trying to do is represented below. I am attempting to perform the following actions in sequence:
Create Data (User Object) --->Send "create" request --> Return the object to another component-->Do something with the object
The data I am creating is below:
interface User {
firstName: String;
lastName: string;
}
const aUser: User = {
firstName: 'James',
lastName: 'Kirk',
}
I am using Axios to request a server to create the user record in a database:
export const createUser = async (nwUser: NetUser) => {
const response = await userKey.post<IResult>('/user/create',nwUser);
return response.data;
}
The code that calls the request function is below. Note that I am attempting to save the aUser object, then return it to the calling function.
function doSubmit(isNew: boolean): aUser {
let userpromise;
if(isNew) {
userpromise = addUser();
else
userpromise = performSomeOtherAction();
userpromise.then((user)=> return(user));
}
async function addUser(): Promise<User> {
const result = createUser(aUser);
result.then((value) =>{
const name = changeObj.firstName+" "+changeObj.lastName;
if(value.success)
alert(name+" was successfully added");
else
alert("Add of "+name+" failed: "+value.message);
return aUser;
});
}
Ultimately, what I am trying to do is to call the doSubmit() function from a parent component, which uses useRef() to
access doSubmit. the parent makes the doSubmit call:
const user = doSubmit(true);
so that I can do things with the user object.
Unfortunately, the code as I have written it does not work. I cannot seem to make the addUser() function return the User promise.
Is there a way to do this? How can I make a function like addUser return the promise for an object that exists within a component?
]]>The other day, I wanted to start a project using React on Rails. Some of the docs and YouTube videos out there are a few years old, and I found it hard to know exactly what steps to follow for a brand new React on Rails app using the latest versions of things. One of the challenges was the switch from webpacker to shakapacker. I would follow the instructions somewhere and I would end up with webpacker.
In the end, the React on Rails Getting Started docs are the best (see link in Reply). But then I thought, wouldn’t it be nice if the next person could start a new React on Rails project using just one command with everything necessary installed, including Ruby, Rails, Node.js, Yarn, etc.? So I created a way to do that and put it up on GitHub. By running a single curl command, it will create a brand new React on Rails project in whatever local directory you choose, and then fire up the dev server processes. You run 1 command, and a few minutes later, depending on the speed of your connection, you can open up the Hello World page.
Let me know what you think!
Nice to meet you all. Thanks for putting React on Rails together.
]]>First, the Huberman Lab. This isn’t just any health resource; it’s a standout for its thorough approach to health science. The content is deep, well-researched, and actionable, making it a go-to for anyone serious about understanding the ‘why’ and ‘how’ of health practices. Plus, it’s entertaining!
Then there’s Peter Attia. His insights on longevity and health optimization are second to none. For a deeper dive, his book, Outlive, is a compelling read, combining rigorous science with practical advice. It’s a resource I frequently return to for its depth and clarity.
Don’t miss out on Rhonda Patrick’s Found My Fitness. Rhonda’s ability to distill complex health topics into accessible information is unmatched. Her site is a fantastic resource for anyone wanting to make informed decisions about their health.
For those looking to enhance their physical well-being, Built to Move is a must-read. This book is a practical guide to maintaining mobility and overall physical health, rooted in current research and easy-to-apply practices.
Lastly, my experience with DNS (Dynamic Neuromuscular Stabilization) this past year has been transformative. For an insightful look into DNS, check out this interview with Dr. Rintalla by Peter Attia. It’s a deep dive into practical applications of DNS and how it can impact mobility and health.
These resources have been invaluable in my health journey, offering a blend of scientific rigor and practical advice. They’re worth exploring for anyone serious about maintaining or improving their health in 2024.
]]>This command found that I had a couple “names/nodes” set up for build and I was using desktop-linux. Bad.
> docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
default docker
default default running v0.11.6+616c3f613b54 linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64, linux/arm/v7, linux/arm/v6
desktop-linux * docker
desktop-linux desktop-linux running v0.11.6+616c3f613b54 linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64, linux/arm/v7, linux/arm/v6
We made this switch and
, great results!
docker context use default
Incidentally, this command works great for tracing progress during the build:
docker build --progress=plain .
]]>bin/webpacker? bin/webpacker-dev-server? Using Procfile.dev?
If you are running dev-server, you changes should get bundled again. Doesn’t matter what change you make.
In the worst case, you can remove the bundled files in the public directory (check config/webpacker.yml for the right path`.
Please improve
And consider upgrading to the latest version for better support.
]]>Sigh. I go back and fix the code. Look at console again.
[object Object]
I try tweaking the message to see if the code is being rebuilt. NOPE!
So okay: I try every asset recompilation directive I can THINK OF to try and get the JSX to rebuild again. All the react_on_rails ones. NOPE! assets:clobber | assets:recompile. NOPE! Still using the same precompiled code it got wrong.
And since it isn’t in the documentation how to do that, I’m stumped.
We’re still on 6.1.1. I’m trying to just get my code to work. Can someone tell me which rake task will actually clobber and rebuild JSXs so that you can make code changes and they work?
]]>Both frameworks capable of building high-performance applications, and the choice between them often depends on your specific project requirements and priorities. Also both frame work are . You should choose between them on your familiarity with the programming languages (Dart vs. JavaScript), the specific features and libraries you require.
]]># in Rakefile
...
Rails.application.load_tasks
if Rake::Task.task_defined?('assets:precompile')
precompile_task = Rake::Task['assets:precompile']
precompile_task.prerequisites.delete('webpacker:yarn_install')
precompile_task.prerequisites.delete('yarn:install')
end
]]>Copilot is a completion engine that uses Machine Learning to suggest code completions. I assume that you already have access to Copilot in your GitHub account. If you don’t, go and try it for free!
Here are some instructions that can help you set it up in your Emacs environment:
First, ensure that your Emacs version is at least 27, and you have these packages installed: s, dash, editorconfig, use-package, quelpa-use-package, and quelpa. You can find them in melpa.
Once you have quelpa installed, you can fetch Copilot from GitHub and install it with the following code:
(require 'quelpa)
(require 'use-package)
(require 'quelpa-use-package)
(use-package copilot
:quelpa (copilot :fetcher github
:repo "zerolfx/copilot.el"
:branch "main"
:files ("dist" "*.el")))
copilot-next-completion and copilot-previous-completion since I can’t remember whether Copilot ever could switch between different completion variants. However, I do bind some other keys to make my Copilot experience smoother:(define-key copilot-mode-map (kbd "M-C-<return>") #'copilot-accept-completion)
(define-key copilot-mode-map (kbd "C-<right>") #'copilot-accept-completion-by-word)
(define-key copilot-mode-map (kbd "C-<down>") #'copilot-accept-completion-by-line)
'(copilot-network-proxy
'(:host <host-string> :port <port-number> :username <username-string> :password <password-string>))
You’ll need to authenticate with your GitHub account that has a subscription to the Copilot product. To do this, run the command M-x copilot-login in Emacs and follow the prompts.
Finally, don’t forget to activate Copilot by running the command M-x copilot-mode in chosen buffers, or activate it everywhere by adding (global-copilot-mode) to your .emacs file.
That’s it! With these steps, you should now be able to use Copilot in Emacs.
If you’re still having trouble getting Copilot to work in Emacs after following these steps, it could be because I’ve missed something important. In that case, I highly recommend checking out this more in-depth article by Robert Krahn: Setting up Github Copilot in Emacs | Robert Krahn. With a little patience and some tinkering, you’ll soon be enjoying the benefits of Copilot in Emacs.
Happy coding!
]]>console.logs show the same if you put them in the end of the async function fetchOrderDetail? ]]>I just ran your project locally, and it seems you have been able to fix the issue. I assume you could figure out the problem. I would appreciate it if you could share what was going wrong.
]]>API in react using axios.Uncaught TypeError: Cannot read properties of undefined (reading 'id') whenever i try doing something like order.service.id, if i am on the service detail page and log service.id, it displays the id in the console, now, i am in the order detail page and trying to fetch the service that the user have ordered in the order page and i am trying to get the service id from the order like this order.service.id object because the order have a foreignkey to the service, but it keep showing the undefined error.
const {order_id} = useParams();
const [order, setOrderDetail] = useState([])
useEffect(() => {
const fetchOrderDetail = async () => {
await api.get(baseUrl + '/buyer-order-detail/' + user_id + '/' + order_id).then((res) => {
setOrderDetail(res.data)
})
}
fetchOrderDetail()
}, [])
console.log(order.id) // 31
console.log(order.price) // $100.00
console.log(order.service.id) // undefined
console.log(order.service.title) // undefined
//Hence the request below does not run because `order.service.id` is undefines.
axios.get(baseUrl + '/fetch-review-status/' + order.service.id + '/' + user_id)
This always happens when the chaining (order.id)starts getting nested (chained) more and more, e.g order.service.title or order.service.user.full_name
{
"id": 31,
"service": {
"id": 1,
"sid": "hpnqaofesz",
"image": "http://127.0.0.1:8000/media/service-images/young-sports-lady-beach-make-meditation-exercises.jpg",
"title": "Mediation",
"description": "<p>Mediation</p>",
"price": "20.00",
"tags": null,
"features": null,
"address": "Ulleja Street",
"longitude": "21330897654",
"latitude": "41230897651",
"views": 196,
"status": "live",
"date": "2023-03-11T09:43:12.530767Z",
"user": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"category": {
"id": 1,
"cid": "nstan",
"image": "http://127.0.0.1:8000/media/category.jpg",
"title": "Health",
"slug": "Health",
"description": "",
"date": "2023-03-11T09:42:49.447683Z"
},
"liked": []
},
"description": "Limitless Learning For Everyone",
"phone": "+2348091744974",
"seller": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"buyer": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"buyer_profile": {
"pid": "58394133406067328223",
"user": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"full_name": "Destiny Franks",
"bio": "Software Enginner",
"country": "Nigeria",
"image": "http://127.0.0.1:8000/media/user_images/13891866_SL_0212121_40670_78.jpg",
"address": "Ulleja Street",
"phone": "+2348091744974",
"website": "https://cwivel.com/",
"pin": "6387",
"facebook": "https://facebook.com/",
"instagram": "https://instagram.com/",
"twitter": "https://twitter.com/",
"whatsApp": "+123 (456) 789",
"verified": false,
"wallet": "0.00",
"saved_service": [
{
"id": 1,
"sid": "hpnqaofesz",
"image": "http://127.0.0.1:8000/media/service-images/young-sports-lady-beach-make-meditation-exercises.jpg",
"title": "Mediation",
"description": "<p>Mediation</p>",
"price": "20.00",
"tags": null,
"features": null,
"address": "Ulleja Street",
"longitude": "21330897654",
"latitude": "41230897651",
"views": 196,
"status": "live",
"date": "2023-03-11T09:43:12.530767Z",
"user": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"category": {
"id": 1,
"cid": "nstan",
"image": "http://127.0.0.1:8000/media/category.jpg",
"title": "Health",
"slug": "Health",
"description": "",
"date": "2023-03-11T09:42:49.447683Z"
},
"liked": []
}
],
"times_saved": 0,
"code": "REF1e4j5eh3d3",
"recommended_by": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"total_rating": 0,
"total_service": 1,
"total_orders": 1,
"total_cash_spent": 100,
"weekly_expenses": 100,
"followers": [
{
"id": 1,
"username": "destiny",
"email": "[email protected]"
}
],
"followings": [
{
"id": 1,
"username": "destiny",
"email": "[email protected]"
}
],
"date": "2023-03-11T09:06:40.886952Z"
},
"seller_profile": {
"pid": "58394133406067328223",
"user": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"full_name": "Destiny Franks",
"bio": "Software Enginner",
"country": "Nigeria",
"image": "http://127.0.0.1:8000/media/user_images/13891866_SL_0212121_40670_78.jpg",
"address": "Ulleja Street",
"phone": "+2348091744974",
"website": "https://cwivel.com/",
"pin": "6387",
"facebook": "https://facebook.com/",
"instagram": "https://instagram.com/",
"twitter": "https://twitter.com/",
"whatsApp": "+123 (456) 789",
"verified": false,
"wallet": "0.00",
"saved_service": [
{
"id": 1,
"sid": "hpnqaofesz",
"image": "http://127.0.0.1:8000/media/service-images/young-sports-lady-beach-make-meditation-exercises.jpg",
"title": "Mediation",
"description": "<p>Mediation</p>",
"price": "20.00",
"tags": null,
"features": null,
"address": "Ulleja Street",
"longitude": "21330897654",
"latitude": "41230897651",
"views": 196,
"status": "live",
"date": "2023-03-11T09:43:12.530767Z",
"user": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"category": {
"id": 1,
"cid": "nstan",
"image": "http://127.0.0.1:8000/media/category.jpg",
"title": "Health",
"slug": "Health",
"description": "",
"date": "2023-03-11T09:42:49.447683Z"
},
"liked": []
}
],
"times_saved": 0,
"code": "REF1e4j5eh3d3",
"recommended_by": {
"id": 1,
"password": "pbkdf2_sha256$260000$1o9WBXwtcSeveI4ZWiprQm$+0U0ZSIUUXwvEe30yto2mSxsAv85c6iM2wm7wOeVRnE=",
"last_login": "2023-03-18T14:18:52.953050Z",
"is_active": true,
"date_joined": "2023-03-11T09:06:40.400367Z",
"username": "destiny",
"first_name": "",
"last_name": "",
"image": "http://127.0.0.1:8000/media/default.jpg",
"wallet": "0.00",
"verified": false,
"email": "[email protected]",
"is_staff": true,
"is_superuser": true,
"groups": [],
"user_permissions": []
},
"total_rating": 0,
"total_service": 1,
"total_orders": 1,
"total_cash_spent": 100,
"weekly_expenses": 100,
"followers": [
{
"id": 1,
"username": "destiny",
"email": "[email protected]"
}
],
"followings": [
{
"id": 1,
"username": "destiny",
"email": "[email protected]"
}
],
"date": "2023-03-11T09:06:40.886952Z"
},
"booking_date": "2023-03-17",
"booking_time": "14:01:39",
"status": "delivering",
"duration": "1_week",
"date": "2023-03-17T12:29:58.241805Z",
"payment_status": "paid",
"price": "100.00"
}
I would provide more code and information if needed
]]>I believe that there are some developers that answer: I just like coding and solve problems. I forget to eat and even sleep while performing my tasks. News can wait, and I also easily say no to a family member or a friend that require my work time. OK, you are fantastic at managing your work tasks! What about other life tasks and chores? Don’t you easily forget what you wanted or were asked to do? Or you write everything down but rarely even look through your writings? What motivates you to write posts here? ![]()
As for me, I want to have a system to stay motivated. What helps me is gamification. Have you heard about Habitica? It’s a game, but to progress there you need to do your real life tasks. Recently, they celebrated their 10th anniversary. And before they started, and I discovered them, I had to invent my own primitive motivation games in spreadsheets to keep different topics of my life covered. And I granted myself time to play a computer game, for example.
That is what motivated me: I wanted to make a move in a turn-based strategy, and I made myself do anything really useful for that. For example, I had a topic Contribution, so I had to help someone. I translated pages from OpenOffice Wiki into Russian to help a Russian company with their own Pro fork. They even met with me and presented their book with CD. So, what motivated me to contribute? Sudden presents I never used? A gratitude? No, thank you, it doesn’t motivate me. But gamification does.
Now with the help of Habitica, Org Mode and my buggish layer between them org-habitica written in Emacs Lisp, I motivate myself to do my daily routine and other tasks. ![]()
Have you tried Hotwire?
]]>I am new here. I was doing react for sometime and recently stumbled upon svelte (it was after reading an article which contrasted the difference between the two)
I was so inspired to try svelte after that, now after a week it feels that react was such and overhead. In everyway svelte feels better. Speed, productivity, happiness.
What is stopping people and companies to switch to svelte and svelteKIT now that vercel is backing it?
]]>Inclusive I followed @ahangarha setup but is the same issue when I run rails webpacker:install
@Dangelo-JAN are you using current versions of Shakapacker and React on Rails?
]]>rails webpacker:install or bundle exec rails webpacker:install it throws /home/dangelo/.rbenv/versions/3.1.2/bin/ruby: No such file or directory -- /home/dangelo/Desktop/things/The (LoadError) .
I have been searching to solve this issue but I can’t found any solution, inclusive I created a new project with webpacker gem (to check if my enviroment have any problem with that) and rails webpacker:install the installation works but ussing shakapacker gem dosn’t work
The react on rails generator works
My repo: Dangelo-JAN/test-react-on-rails repo
Thanks: Dangelo Arrivillaga
]]>master onto your feature branch without rebasing it, and push the changes, then your branch may get cluttered. And also, your pull-request might show files that were not modified by you: the files that were edited again in master after your merge. That can be fixed by squashing all the previous commits with the help of a temporary branch:
This way you get only one commit and your pull-request will show only files that were modified by you. I have found this solution in Stack Overflow, and it helped me with one of my tasks.
]]>The left property is a performance killer, because it forces the browser to repaint the layout with each pixel moved.
A better solution would be to use the CSS transform property. It won’t affect performance, and everything will run smoothly. A simple choice of property can signicantly improve performance!
Add Rake::Task["yarn:install"].clear to stop Rails from triggering unnecessary runs of yarn install during your deployments.
Do you want to stop seeing extra runs of yarn install when you run rake assets:precompile in your Rails project?
Why are you already running yarn install when you deploy?
yarn install should create a docker image layer, which is a layer prior to the building of assets.yarn install.Rails automatically adds a dependency of task yarn:install to assets:precompile in versions prior to 7.x, and some Rails gems add yarn:install as a dependency`. See
In Rails 6.x:
This changed in Rails 7:
Call yarn directly by zarqman · Pull Request #43641 · rails/rails · GitHub so that some Rails gems, notably jsbundling-rails and csbundling-rails now do this dependency enhancement.
yarn install
Add this to your project Rakefile, after the call to Rails.application.load_tasks:
# Skip auto-running `yarn install` when running `rails assets:precompile`
Rake::Task["yarn:install"].clear
If you’re using ShakaPacker, a bug introduced in 6.4.1 is fixed in 6.5.6 per Clean up duplicated yarn install by justin808 · Pull Request #238 · shakacode/shakapacker · GitHub.
]]>yarn:install was being added.
From the rake installation, find the source of the gem file gems/rake-13.0.6/lib/rake/task.rb and modify the enhance method to have this DEBUG UPDATE.
Then run your rake task, or even something like rake -T to see where the enhance happens.
def enhance(deps=nil, &block)
# DEBUG UPDATE
if deps && deps.include?("yarn:install")
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
puts "deps = #{deps.ai}"
puts "STACK TRACE for where adding dependency yarn:install"
puts caller
puts "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
end
# END DEBUG UPDATE
@prerequisites |= deps if deps
@actions << block if block_given?
self
end
And after running this code, I saw that where yarn:install was getting added to assets:precompile.
Over the years of reviewing code, I noticed that most of the people related to product development (designers, managers, engineers) ignore error handling. Honest question: why? This is one of the most critical parts of the software. This is what makes a product superior. I would forgive broken styling, but the way software handles possible errors is the overall quality marker for this software.If users don’t receive proper feedback on errors, including:
then such software is not intended to be used by humans.
Couldn’t agree more. I would say that maybe it’s because:
This can be mentally taxing. I’ve found that it is sometimes helpful to think about errors as part of the domain itself, and to model them as regular data, returned and moved around through the same channels. It doesn’t make it easier, but at least, maybe a little less tedious.
I would say it is really heavy work when the domain is designed without considering proper error handling. When it is encoded from day 1 and encouraged by the company culture, it is much easier to handle it. Still, great error handling takes time and requires a lot of thought process & care, but it is worth it, IMO. As a user, I greatly appreciate it. This is my personal litmus test for software quality.
This whole discussion (especially your last comment Alex) could be re-packaged for accessibility, localization, RTL, dark modes, and other less visible things as well. All of them are just as difficult when not designed properly from day 1, and for me, it’s also a big indicator of (FE) software quality. Different scales.
]]>Note, use the default keyboard for keys to map. Alt is Option. Windows is CMD.

Key to reposition
New position
Left Control
Home
Right Control
Page Up
Windows (Cmd)
Left Ctrl
Windows
Right Ctrl
Left Alt
Windows
Scroll Lock
Insert (left of left cursor)
Home
Print Scrn
End
Scroll Lock
Page Up
End
Esc
Caps Lock
I am having some flakiness on the cypress specs. I’ll soon update this with findings about the reasons. However, did you see any general patterns?
For instance, async rendering of dropdown options and using “down + enter” might introduce failures.
]]>module setting from commonjs to auto. Why?
]]>When To Use React Native:
Is React On Rails compatible with this non-webpack HTM approach?
Hi! Import maps would not work for SSR.
For client side only rendering, I really don’t know.
I don’t think many React apps are using Import maps.
]]>